spielwiese
Release-4-3-2p1
Last change
on this file was
fb1675,
checked in by Hans Schoenemann <hannes@…>, 6 years ago
|
use include ".." for singular related .h, p8
|
-
Property mode set to
100644
|
File size:
982 bytes
|
Line | |
---|
1 | /* emacs edit mode for this file is -*- C++ -*- */ |
---|
2 | |
---|
3 | //{{{ docu |
---|
4 | // |
---|
5 | // factorize.cc - sample Factory application. |
---|
6 | // |
---|
7 | //}}} |
---|
8 | |
---|
9 | #include "factory.h" |
---|
10 | |
---|
11 | int |
---|
12 | main() |
---|
13 | { |
---|
14 | Variable x( 'x' ); |
---|
15 | Variable y( 'y' ); |
---|
16 | Variable z( 'z' ); |
---|
17 | CanonicalForm f; |
---|
18 | |
---|
19 | cout << "Do not forget to terminate canonical forms with `;' in input!" << endl; |
---|
20 | |
---|
21 | setCharacteristic( 0 ); |
---|
22 | cout << "Multivariate factorization in characteristic 0." << endl; |
---|
23 | cout << "Please enter a multivariate polynomial over Z." << endl; |
---|
24 | cout << "f(x, y, z) = "; |
---|
25 | cin >> f; |
---|
26 | cout << "f = " << f << endl; |
---|
27 | cout << "factorize(f) = " << factorize( f ) << endl << endl; |
---|
28 | |
---|
29 | setCharacteristic( 29 ); |
---|
30 | cout << "Univariate factorization in GF(29)." << endl; |
---|
31 | cout << "Please enter an univariate polynomial over GF(29)." << endl; |
---|
32 | cout << "f(x) = "; |
---|
33 | cin >> f; |
---|
34 | cout << "f (mod 29) = " << f << endl; |
---|
35 | cout << "factorize(f) = " << factorize( f ) << endl; |
---|
36 | } |
---|
Note: See
TracBrowser
for help on using the repository browser.