Added /serial.cmd* to .gitignore. Minor changes to build with version

of gcc on newcomp.  Use global reference (::) in linear_combination*
typedefs in ring classes.  Renamed linear_combiation::set set_coeff.
This commit is contained in:
Cotton Seed 2011-12-14 13:32:28 -05:00
parent 53a139416c
commit 5d4acb7a86
9 changed files with 25 additions and 22 deletions

1
.gitignore vendored
View File

@ -3,3 +3,4 @@
/gss
/main
/testsurfaces
/serial.cmd*

View File

@ -2,9 +2,9 @@
class Q
{
public:
typedef linear_combination<Q> linear_combination;
typedef ::linear_combination<Q> linear_combination;
// typedef linear_combination_iter<Q> linear_combination_iter;
typedef linear_combination_const_iter<Q> linear_combination_const_iter;
typedef ::linear_combination_const_iter<Q> linear_combination_const_iter;
private:
int n;

View File

@ -2,8 +2,8 @@
class Z
{
public:
typedef linear_combination<Z> linear_combination;
typedef linear_combination_const_iter<Z> linear_combination_const_iter;
typedef ::linear_combination<Z> linear_combination;
typedef ::linear_combination_const_iter<Z> linear_combination_const_iter;
enum steal { STEAL };
@ -150,7 +150,9 @@ class Z
triple<Z, Z, Z> extended_gcd (const Z &z) const
{
mpz_t d, s, t;
mpz_inits (d, s, t, 0);
mpz_init (d);
mpz_init (s);
mpz_init (t);
mpz_gcdext (d, s, t, impl->x, z.impl->x);
return triple<Z, Z, Z> (Z (STEAL, d),
Z (STEAL, s),

View File

@ -1,9 +1,9 @@
class Z2
{
public:
typedef linear_combination<Z2> linear_combination;
typedef ::linear_combination<Z2> linear_combination;
// typedef linear_combination_iter<Z2> linear_combination_iter;
typedef linear_combination_const_iter<Z2> linear_combination_const_iter;
typedef ::linear_combination_const_iter<Z2> linear_combination_const_iter;
private:
bool v;

View File

@ -3,8 +3,8 @@ template<unsigned p>
class Zp
{
public:
typedef linear_combination<Zp<p> > linear_combination;
typedef linear_combination_const_iter<Zp<p> > linear_combination_const_iter;
typedef ::linear_combination<Zp<p> > linear_combination;
typedef ::linear_combination_const_iter<Zp<p> > linear_combination_const_iter;
private:
unsigned v;

View File

@ -2,8 +2,8 @@
template<class T> class fraction_field
{
public:
typedef linear_combination<fraction_field> linear_combination;
typedef linear_combination_const_iter<fraction_field> linear_combination_const_iter;
typedef ::linear_combination<fraction_field> linear_combination;
typedef ::linear_combination_const_iter<fraction_field> linear_combination_const_iter;
private:
T num;

View File

@ -93,7 +93,7 @@ class linear_combination
R annihilator () const;
void set (R c, unsigned i)
void set_coeff (R c, unsigned i)
{
if (c == 0)
v -= i;
@ -348,7 +348,7 @@ class linear_combination<Z2>
return Z2 (operator == (0) ? 1 : 0);
}
void set (Z2 c, unsigned i)
void set_coeff (Z2 c, unsigned i)
{
if (c == 0)
v -= i;

View File

@ -529,10 +529,10 @@ quotient_helper<R>::improve_pivot_column (unsigned i, unsigned j, unsigned j2)
R rkc = rk(j),
rkc2 = rk(j2);
rk.set (rkc*t.second + rkc2*t.third,
j);
rk.set (rkc2*(rc.div (t.first)) - rkc*(rc2.div (t.first)),
j2);
rk.set_coeff (rkc*t.second + rkc2*t.third,
j);
rk.set_coeff (rkc2*(rc.div (t.first)) - rkc*(rc2.div (t.first)),
j2);
}
linear_combination g = generators[j],
@ -560,8 +560,8 @@ quotient_helper<R>::improve_pivot_column (unsigned i, unsigned j, unsigned j2)
R d = ginv(j),
d2 = ginv(j2);
ginv.set (t.second*d + t.third*d2, j);
ginv.set (rc.div (t.first) * d2 - rc2.div (t.first) * d, j2);
ginv.set_coeff (t.second*d + t.third*d2, j);
ginv.set_coeff (rc.div (t.first) * d2 - rc2.div (t.first) * d, j2);
}
#if 0

View File

@ -134,8 +134,8 @@ template<class T, unsigned n>
class multivariate_polynomial
{
public:
typedef linear_combination<multivariate_polynomial<T, n> > linear_combination;
typedef linear_combination_const_iter<multivariate_polynomial<T, n> >
typedef ::linear_combination<multivariate_polynomial<T, n> > linear_combination;
typedef ::linear_combination_const_iter<multivariate_polynomial<T, n> >
linear_combination_const_iter;
private:
@ -268,7 +268,7 @@ public:
pair<multivariate_polynomial, multivariate_polynomial>
uncommon_factors (multivariate_polynomial b, basedvector<multivariate_polynomial, 1> ds);
maybe<multivariate_polynomial>
divides_exactly (const multivariate_polynomial &n) const;
divides_exactly (const multivariate_polynomial &num) const;
multivariate_polynomial divide_exact (const multivariate_polynomial &d) const;
bool operator | (const multivariate_polynomial &num) const { abort (); }