![]() |
Mackey
V3.3
A C++ library for computing RO(G) graded homology
|
The Smith Normal Form and its coefficient matrices. More...
#include <Smith.hpp>
Public Member Functions | |
SmithNormalForm (const _S &S, bool do_P=1, bool do_Q=1, bool do_sort=1, bool do_verify=0) | |
Constructor computes the Smith Normal Form. More... | |
Public Attributes | |
row_vector_t< _S > | diagonal |
The diagonal of the Smith normal form. More... | |
_R | P |
One of the coefficient matrices (S=P*A*Q) More... | |
_R | Qi |
One of the coefficient matrices (A=Pi*S*Qi) More... | |
_C | Q |
One of the coefficient matrices (S=P*A*Q) More... | |
_C | Pi |
One of the coefficient matrices (A=Pi*S*Qi) More... | |
The Smith Normal Form and its coefficient matrices.
The SNF of \(A\) is a diagonal matrix \(S\) and invertible coefficient matrices \(P,Q\) s.t. \(PAQ=S\)
S is stored as a diagonal vector diagonal
. In addition to P,Q
we also store their inverses Pi,Qi
.
All are computed simultaneously through row-column elimination
_S | The type of the original matrix. |
_R | Row major version of _S |
_C | Column major version of _S |
SmithNormalForm | ( | const _S & | S, |
bool | do_P = 1 , |
||
bool | do_Q = 1 , |
||
bool | do_sort = 1 , |
||
bool | do_verify = 0 |
||
) |
Constructor computes the Smith Normal Form.
S | The given matrix to diagonalize |
do_P | Set to 1 if P,Pi are wanted |
do_Q | Set to 1 if Q,Qi are wanted |
do_sort | Set to 1 if we want the diagonal of the SNF to be ordered and increasing, excluding any units |
do_verify | Set to 1 to verify the SNF was computed correctly (for debugging). |
row_vector_t<_S> diagonal |
The diagonal of the Smith normal form.
_R P |
One of the coefficient matrices (S=P*A*Q)
_R Qi |
One of the coefficient matrices (A=Pi*S*Qi)
_C Q |
One of the coefficient matrices (S=P*A*Q)
_C Pi |
One of the coefficient matrices (A=Pi*S*Qi)