Changeset 2998
- Timestamp:
- 07/02/08 09:09:34 (2 months ago)
- Files:
-
- 1 modified
-
trunk/linbox/examples/charpoly.C (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/linbox/examples/charpoly.C
r2772 r2998 11 11 #include "Matio.h" 12 12 13 #include "linbox/util/timer.h" 13 14 #include "linbox/field/modular-double.h" 14 15 #include "linbox/field/unparametric.h" … … 74 75 int main (int argc, char **argv) 75 76 { 76 cout<<setprecision(8); 77 commentator.setMaxDetailLevel(-1); 78 cout<<setprecision(8); 77 79 cerr<<setprecision(8); 78 80 if (argc < 2 || argc > 3) { … … 91 93 typedef GivPolynomialRing<PID_integer,Dense> IntPolRing; 92 94 IntPolRing::Element c_A; 93 charpoly (c_A, A);94 95 96 Timer tim; tim.clear();tim.start(); 97 charpoly (c_A, A); 98 tim.stop(); 95 99 96 100 cout << "Characteristic Polynomial is "; 97 101 printPolynomial (cout, ZZ, c_A) << endl; 102 cout << tim << endl; 98 103 99 104 #ifdef __LINBOX_HAVE_NTL … … 106 111 vector<unsigned long> exp; 107 112 IntPolRing IPD(ZZ); 113 tim.start(); 108 114 IPD.factor (intFactors, exp, c_A); 115 tim.stop(); 109 116 commentator.stop("done", NULL, "NTLfac"); 110 117 printFactorization(cout << intFactors.size() << " integer polynomial factors:" << endl, ZZ, intFactors, exp) << endl; 118 cout << tim << endl; 119 111 120 } 112 121 #endif
