#include <smith-form-adaptive.h>
Static Public Methods | |
| template<class Matrix> void | compute_local_long (std::vector< integer > &s, const Matrix &A, long p, long e) |
| template<class Matrix> void | compute_local_big (std::vector< integer > &s, const Matrix &A, long p, long e) |
| template<class Matrix> void | compute_local (std::vector< integer > &s, const Matrix &A, long p, long e) |
| template<class Matrix> void | smithFormSmooth (std::vector< integer > &s, const Matrix &A, long r, const std::vector< long > &sev) |
| template<class Matrix> void | smithFormRough (std::vector< integer > &s, const Matrix &A, integer m) |
| template<class Matrix> void | smithFormVal (std::vector< integer > &s, const Matrix &A, long r, const std::vector< long > &sev) |
| template<class Matrix> void | smithForm (std::vector< integer > &s, const Matrix &A) |
| Smith form of a dense matrix by adaptive algorithm. | |
| template<class IRing> void | smithForm (std::vector< integer > &s, const DenseMatrix< IRing > &A) |
Static Public Attributes | |
| const long | prime [] = {2, 3, 5, 7, 11, 13, 17, 19, 23, 29, 31, 37, 41, 43, 47, 53, 59, 61, 67, 71, 73, 79, 83, 89, 97} |
| const int | NPrime = 25 |
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
Meet trouble to call ffpack routine Modular<double> F (p); Modular<double>::Element elt; int n = A. rowdim(); int m = A. coldim(); Modular<double>::Element* A_local = new Modular<double>::Element [n * m]; typename Matrix::ConstRawIndexedIterator rawi_p; typename Matrix::ConstRawIterator raw_p; Modular<double>::Element* A_local_p; for (A_local_p = A_local; A_local_p != A_local + (n*m); ++ A_local_p) F. init (*A_local_p, 0); integer tmp; for (rawi_p = A. rawIndexedBegin(), raw_p = A. rawBegin(), A_local_p = A_local; rawi_p != A. rawIndexedEnd(); ++ rawi_p, ++ raw_p, ++ A_local_p) { F. init (*A_local_p, *raw_p); A. field(). convert (tmp, *raw_p); F. init (elt, tmp); F. assign (*(A_local + (int(rawi_p. rowIndex()) * m + int(rawi_p. colIndex()))), elt); }
std::cout << "Initialize matrix done
unsigned int rank = FFPACK::Rank (F, n, m, A_local, m); std::cout << "Call of ffpack is done |
|
||||||||||||||||||||
|
|
|
||||||||||||
|
Specialization for dense case |
|
||||||||||||
|
Smith form of a dense matrix by adaptive algorithm. Compute the largest invariant factor, then, based on that, compute the rough and smooth part, separately. Should work with SparseMatrix and DenseMatrix |
|
||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
||||||||||||||||||||
|
|
|
|
|
|
|
|
1.2.18