spielwiese
Last change
on this file since 85bcd6 was
6ce030f,
checked in by Oleksandr Motsak <motsak@…>, 11 years ago
|
removal of the $Id$ svn tag from everywhere
NOTE: the git SHA1 may be used instead (only on special places)
NOTE: the libraries Singular/LIB/*.lib still contain the marker due to our current use of svn
|
-
Property mode set to
100644
|
File size:
1.2 KB
|
Line | |
---|
1 | /////////////////////////////////////////////////////////////////////////////// |
---|
2 | // factory - Includes |
---|
3 | // (x+y+z)*(x+y-z)*(x-y+z)*(x-y-z)*x*y; |
---|
4 | #include <factory.h> |
---|
5 | // Factor - Includes |
---|
6 | #include "tmpl_inst.h" |
---|
7 | #include "Factor.h" |
---|
8 | #include "SqrFree.h" |
---|
9 | |
---|
10 | main() |
---|
11 | { |
---|
12 | CanonicalForm f,g; |
---|
13 | int charac; |
---|
14 | CFFList Factorlist; |
---|
15 | CFFactor copy; |
---|
16 | |
---|
17 | // cout << " Characteristic = "; |
---|
18 | cin >> charac; |
---|
19 | setCharacteristic(charac); |
---|
20 | On(SW_SYMMETRIC_FF); |
---|
21 | g=1; |
---|
22 | // cout << " f = "; |
---|
23 | cin >> f; |
---|
24 | // cout << " f = " << f << endl; |
---|
25 | // cout << " f(SqrFree)= " << endl; |
---|
26 | // cout << SqrFree(f) << endl << endl; |
---|
27 | //cout << "gcd(f,f.deriv())= gcd(" << f << "," << f.deriv() << ")= " << gcd(f,f.deriv()) << endl; |
---|
28 | //cout << "gcd(f,f.deriv())= gcd(" << f << "," << f.deriv() << ")= " << gcd(f,f.deriv()) << endl; |
---|
29 | Factorlist = Factorize( f ); |
---|
30 | cout << Factorlist ;//<< endl; |
---|
31 | // Ueberpruefen: |
---|
32 | for ( CFFListIterator i=Factorlist ; i.hasItem(); i++){ |
---|
33 | copy = i.getItem(); |
---|
34 | if ( getNumVars(copy.factor()) > 0 ) |
---|
35 | for ( int j=1; j<=copy.exp(); j++) |
---|
36 | g *= copy.factor(); |
---|
37 | else g *= copy.factor(); |
---|
38 | } |
---|
39 | if ( (f-g) != f.genZero() ){ |
---|
40 | cerr << "\nList and f differ: f= " << f << " g= " << g << endl; |
---|
41 | cerr << "List= " << Factorlist << endl; |
---|
42 | } |
---|
43 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.