linbox

mod m Smith form by elmination More...
#include <iostream>
#include <string>
#include <vector>
#include <list>
#include "linbox/util/timer.h"
#include "linbox/field/unparametric.h"
#include "linbox/field/local2_32.h"
#include "linbox/algorithms/2localsmith.h"
#include "linbox/algorithms/localsmith.h"
#include "linbox/algorithms/iliopouloselimination.h"
#include "linbox/field/PIRmodularint32.h"
Functions  
template<class PIR >  
void  Mat (DenseMatrix< PIR > &M, PIR &R, int n, string src, string file, string format) 
Output matrix is determined by src which may be: "randomrough" This mat will have s, near sqrt(n), distinct invariant factors, each repeated twice), involving the s primes 101, 103, ... More...  
mod m Smith form by elmination
void Mat  (  DenseMatrix< PIR > &  M, 
PIR &  R,  
int  n,  
string  src,  
string  file,  
string  format  
) 
Output matrix is determined by src which may be: "randomrough" This mat will have s, near sqrt(n), distinct invariant factors, each repeated twice), involving the s primes 101, 103, ...
"random" This mat will have the same nontrivial invariant factors as diag(1,2,3,5,8, ... 999, 0, 1, 2, ...). "fib" This mat will have the same nontrivial invariant factors as diag(1,2,3,5,8, ... fib(k)), where k is about sqrt(n). The basic matrix is block diagonal with ith block of order i and being a tridiagonal {1,0,1} matrix whose snf = diag(i1 1's, fib(i)), where fib(1) = 1, fib(2) = 2. But note that, depending on n, the last block may be truncated, thus repeating an earlier fibonacci number. "file" (or any other string) mat read from named file with format "sparse" or "dense". Also "tref" and file with format "kdense"