spielwiese
Last change
on this file since f152c5 was
f152c5,
checked in by Hans Schoenemann <hannes@…>, 12 years ago
|
removed Factorize2
git-svn-id: file:///usr/local/Singular/svn/trunk@14303 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
1.6 KB
|
Rev | Line | |
---|
[341696] | 1 | //static char rcsid[] = "$Id$"; |
---|
[1a80b4] | 2 | /////////////////////////////////////////////////////////////////////////////// |
---|
| 3 | // Factor - Includes |
---|
| 4 | #include "factor.h" |
---|
[e2ca88] | 5 | #ifdef HAVE_IOSTREAM |
---|
| 6 | #include <iostream> |
---|
| 7 | #define CERR std::cerr |
---|
| 8 | #define COUT std::cout |
---|
| 9 | #define CIN std::cin |
---|
| 10 | #elif defined(HAVE_IOSTREAM_H) |
---|
| 11 | #include <iostream.h> |
---|
| 12 | #define CERR cerr |
---|
| 13 | #define COUT cout |
---|
| 14 | #define CIN cin |
---|
| 15 | #endif |
---|
| 16 | |
---|
[1a80b4] | 17 | |
---|
| 18 | |
---|
| 19 | void |
---|
| 20 | setVarNames ( char * vnames ) |
---|
| 21 | { |
---|
| 22 | int i, n = strlen( vnames ); |
---|
| 23 | Variable dummy; |
---|
| 24 | for ( i = 0; i < n; i++ ) |
---|
| 25 | dummy = Variable( i+1, vnames[i] ); |
---|
| 26 | } |
---|
| 27 | |
---|
| 28 | main() |
---|
| 29 | { |
---|
| 30 | CanonicalForm f,g; |
---|
| 31 | int charac; |
---|
| 32 | CFFList Factorlist; |
---|
| 33 | CFFactor copy; |
---|
| 34 | |
---|
[e2ca88] | 35 | COUT << libfac_name <<", Version " << libfac_version << "\n"; |
---|
| 36 | // COUT << " Characteristic = "; |
---|
| 37 | CIN >> charac; |
---|
[1a80b4] | 38 | setCharacteristic(charac); |
---|
| 39 | On(SW_SYMMETRIC_FF); |
---|
| 40 | On(SW_USE_EZGCD); |
---|
| 41 | ////////////////////////////////////////////////////////////// |
---|
| 42 | // char vnames[30]; |
---|
| 43 | //// cout << " vnames = "; |
---|
| 44 | // cin >> vnames; |
---|
| 45 | // |
---|
| 46 | // setVarNames( vnames ); |
---|
| 47 | // |
---|
| 48 | ////////////////////////////////////////////////////////////// |
---|
[e2ca88] | 49 | // COUT << " f = "; |
---|
[f152c5] | 50 | // CIN >> f; |
---|
| 51 | // COUT << f << " mod " << charac << " = " ; |
---|
| 52 | // Factorlist= Factorize( f,0 ); |
---|
| 53 | // COUT << Factorlist ;//<< "\n"; |
---|
[1a80b4] | 54 | // Ueberpruefen: |
---|
[f152c5] | 55 | // g=1; |
---|
| 56 | // for ( CFFListIterator i=Factorlist ; i.hasItem(); i++){ |
---|
| 57 | // copy = i.getItem(); |
---|
| 58 | // if ( getNumVars(copy.factor()) > 0 ) |
---|
| 59 | // for ( int j=1; j<=copy.exp(); j++) |
---|
| 60 | // g *= copy.factor(); |
---|
| 61 | // else g *= copy.factor(); |
---|
| 62 | // } |
---|
| 63 | // if ( (f-g) != f.genZero() ){ |
---|
| 64 | // CERR << "\nList and f differ: f= " << f << " g= " << g << "\n"; |
---|
| 65 | // } |
---|
[1a80b4] | 66 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.