20 using std::cout;
using std::endl;
22 #include "hilbert_functions.hpp" 26 WT_TYPE wt6 [6] = { 3, 2, 1, 1, 1, 1 };
27 list <Monomial> T0 = { x0 };
28 cout <<
"Hilbert numerator of { " << x0 <<
"}\n";
31 cout <<
"Hilbert reduced numerator of { " << x0 <<
"}\n";
34 cout <<
"Graded Hilbert numerator of { " << x0 <<
"}\n";
35 cout <<
"\t(with grading (";
36 for (
unsigned i = 0; i < 6; ++i) cout << wt6[i] <<
',';
40 cout <<
"Graded Hilbert reduced numerator of { " << x0 <<
"}\n";
41 cout <<
"\t(with grading (";
42 for (
unsigned i = 0; i < 6; ++i) cout << wt6[i] <<
',';
45 cout << *hngr << endl;
46 cout <<
"Hilbert polynomial of { " << x0 <<
"}\n";
49 delete hn;
delete hng;
delete hngr;
51 cout << endl; cout << endl;
56 WT_TYPE wt2 [2] = { 5, 3 };
57 list<Monomial> T = { t, u, v };
58 cout <<
"Hilbert numerator of { " << t <<
", " << u <<
", " << v <<
"}\n";
61 cout <<
"Hilbert reduced numerator of { " << t <<
", " << u <<
", " << v <<
"}\n";
64 cout <<
"Graded Hilbert numerator of { " << t <<
", " << u <<
", " << v <<
"}\n";
65 cout <<
"\t(with grading (" << wt2[0] <<
',' << wt2[1] <<
") )\n";
68 cout <<
"Graded Hilbert reduced numerator of { " << t <<
", " << u <<
", " << v <<
"}\n";
69 cout <<
"\t(with grading (" << wt2[0] <<
',' << wt2[1] <<
") )\n";
71 cout << *hngr << endl;
72 cout <<
"Hilbert polynomial of { " << t <<
", " << u <<
", " << v <<
"}\n";
75 delete hn;
delete hng;
delete hngr;
77 cout << endl; cout << endl;
85 WT_TYPE wt5 [5] = { 1, 2, 3, 4, 5 };
86 list<Monomial> T1 = { t1, t2, t3, t4, t5, t6 };
87 cout <<
"Hilbert numerator of { " << t1 <<
',' << t2 <<
',' << t3 <<
',' 88 << t4 <<
',' << t5 <<
',' << t6 <<
"}\n";
91 cout <<
"Hilbert reduced numerator of { " << t1 <<
',' << t2 <<
',' << t3 <<
',' 92 << t4 <<
',' << t5 <<
',' << t6 <<
"}\n";
95 cout <<
"Graded Hilbert numerator of { " << t1 <<
',' << t2 <<
',' << t3 <<
',' 96 << t4 <<
',' << t5 <<
',' << t6 <<
"}\n";
97 cout <<
"\t(with grading (";
98 for (
unsigned i = 0; i < 5; ++i) cout << wt5[i] <<
',';
101 cout << *hng << endl;
102 cout <<
"Graded Hilbert reduced numerator of { " << t1 <<
',' << t2 <<
',' << t3 <<
',' 103 << t4 <<
',' << t5 <<
',' << t6 <<
"}\n";
104 cout <<
"\t(with grading (";
105 for (
unsigned i = 0; i < 5; ++i) cout << wt5[i] <<
',';
108 cout << *hngr << endl;
109 cout <<
"Hilbert polynomial:\n";
112 delete hn;
delete hng;
delete hngr;
Dense_Univariate_Rational_Polynomial * hilbert_polynomial(NVAR_TYPE n, unsigned int pole_order, const list< Monomial > T, Dense_Univariate_Integer_Polynomial *hn, Dense_Univariate_Integer_Polynomial *hn2)
computes the Hilbert polynomial for an ideal
Dense_Univariate_Integer_Polynomial * hilbert_second_numerator(NVAR_TYPE n, Dense_Univariate_Integer_Polynomial *first, const WT_TYPE *grading)
computes the second Hilbert numerator (after reduction by )
Dense_Univariate_Integer_Polynomial * hilbert_numerator_bigatti(const list< Monomial > &T, const WT_TYPE *grading)
the Bigatti algorithm to compute the Hilbert numerator
quick-’n-dirty Dense_Univariate integer polynomial class
Implementation of monomials.
quick-’n-dirty Dense_Univariate rational polynomial class