oILAB
|
#include <SmithDecomposition.h>
Public Member Functions | |
SmithDecomposition (const MatrixNi &A) | |
const MatrixNi & | matrixU () const |
const MatrixNi & | matrixD () const |
const MatrixNi & | matrixV () const |
const MatrixNi & | matrixX () const |
const MatrixNi & | matrixY () const |
Private Types | |
typedef long long int | IntValueType |
typedef Eigen::Matrix< IntValueType, N, N > | MatrixNi |
Private Member Functions | |
void | row_signChange (const int &ID) |
void | col_signChange (const int &ID) |
void | row_swap (const int &i, const int &j) |
void | col_swap (const int &i, const int &j) |
void | row_add_multiply (const int &i, const int &j, const IntValueType &n) |
void | col_add_multiply (const int &i, const int &j, const IntValueType &n) |
bool | reduceFirstRow () |
bool | reduceFirstCol () |
Static Private Member Functions | |
static IntValueType | gcd (const IntValueType &a, const IntValueType &b) |
template<typename Derived > | |
static IntValueType | gcd (const Eigen::MatrixBase< Derived > &v) |
static std::pair< int, int > | findNonZero (const MatrixNi &A) |
static std::pair< int, int > | findNonDivisible (const MatrixNi &A) |
Private Attributes | |
MatrixNi | D |
MatrixNi | U |
MatrixNi | V |
MatrixNi | X |
MatrixNi | Y |
Class template which computes the Smith normal (or canonical) form of a square matrix of integers A.
The decomposition is: A=X*D*Y where X and Y are unimodular integers matrices D is a diagonal ingeter matrix such that D(k,k) divides D(k+1,k+1) The class also computes the matrices U and V such that D=U*A*V where U=inv(X) and V=inv(Y) are also unimodular integer matrices.
Definition at line 28 of file SmithDecomposition.h.
|
private |
Definition at line 30 of file SmithDecomposition.h.
|
private |
Definition at line 31 of file SmithDecomposition.h.
|
inline |
The algorithm follows section 2 in GEORGE HAVAS AND BOHDAN S. MAJEWSKI, Integer Matrix Diagonalization, J. Symbolic Computation (1997) 24, 399–408.
Definition at line 219 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 147 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 95 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 120 of file SmithDecomposition.h.
|
inlinestaticprivate |
Definition at line 68 of file SmithDecomposition.h.
|
inlinestaticprivate |
Definition at line 52 of file SmithDecomposition.h.
|
inlinestaticprivate |
Definition at line 41 of file SmithDecomposition.h.
|
inlinestaticprivate |
Definition at line 34 of file SmithDecomposition.h.
|
inline |
Definition at line 319 of file SmithDecomposition.h.
|
inline |
Definition at line 313 of file SmithDecomposition.h.
|
inline |
Definition at line 325 of file SmithDecomposition.h.
|
inline |
Definition at line 331 of file SmithDecomposition.h.
|
inline |
Definition at line 337 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 185 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 160 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 134 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 84 of file SmithDecomposition.h.
|
inlineprivate |
Definition at line 106 of file SmithDecomposition.h.
|
private |
Definition at line 209 of file SmithDecomposition.h.
|
private |
Definition at line 210 of file SmithDecomposition.h.
|
private |
Definition at line 211 of file SmithDecomposition.h.
|
private |
Definition at line 212 of file SmithDecomposition.h.
|
private |
Definition at line 213 of file SmithDecomposition.h.