jengelh-datetimespielwiese
Last change
on this file since 341696 was
341696,
checked in by Hans Schönemann <hannes@…>, 13 years ago
|
Adding Id property to all files
git-svn-id: file:///usr/local/Singular/svn/trunk@12231 2c84dea3-7e68-4137-9b89-c4e89433aadc
|
-
Property mode set to
100644
|
File size:
993 bytes
|
Rev | Line | |
---|
[328ea5] | 1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
[341696] | 2 | /* $Id$ */ |
---|
[328ea5] | 3 | |
---|
| 4 | //{{{ docu |
---|
| 5 | // |
---|
| 6 | // factorize.cc - sample Factory application. |
---|
| 7 | // |
---|
| 8 | //}}} |
---|
| 9 | |
---|
| 10 | #include <factory.h> |
---|
| 11 | |
---|
| 12 | int |
---|
| 13 | main() |
---|
| 14 | { |
---|
| 15 | Variable x( 'x' ); |
---|
| 16 | Variable y( 'y' ); |
---|
| 17 | Variable z( 'z' ); |
---|
| 18 | CanonicalForm f; |
---|
| 19 | |
---|
[2a4c62] | 20 | cout << "Do not forget to terminate canonical forms with `;' in input!" << endl; |
---|
[328ea5] | 21 | |
---|
| 22 | setCharacteristic( 0 ); |
---|
[2a4c62] | 23 | cout << "Multivariate factorization in characteristic 0." << endl; |
---|
[328ea5] | 24 | cout << "Please enter a multivariate polynomial over Z." << endl; |
---|
| 25 | cout << "f(x, y, z) = "; |
---|
| 26 | cin >> f; |
---|
| 27 | cout << "f = " << f << endl; |
---|
[2a4c62] | 28 | cout << "factorize(f) = " << factorize( f ) << endl << endl; |
---|
[328ea5] | 29 | |
---|
| 30 | setCharacteristic( 29 ); |
---|
[2a4c62] | 31 | cout << "Univariate factorization in GF(29)." << endl; |
---|
[328ea5] | 32 | cout << "Please enter an univariate polynomial over GF(29)." << endl; |
---|
| 33 | cout << "f(x) = "; |
---|
| 34 | cin >> f; |
---|
| 35 | cout << "f (mod 29) = " << f << endl; |
---|
| 36 | cout << "factorize(f) = " << factorize( f ) << endl; |
---|
| 37 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.