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:
parent
53a139416c
commit
5d4acb7a86
|
@ -3,3 +3,4 @@
|
||||||
/gss
|
/gss
|
||||||
/main
|
/main
|
||||||
/testsurfaces
|
/testsurfaces
|
||||||
|
/serial.cmd*
|
||||||
|
|
|
@ -2,9 +2,9 @@
|
||||||
class Q
|
class Q
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<Q> linear_combination;
|
typedef ::linear_combination<Q> linear_combination;
|
||||||
// typedef linear_combination_iter<Q> linear_combination_iter;
|
// 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:
|
private:
|
||||||
int n;
|
int n;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
class Z
|
class Z
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<Z> linear_combination;
|
typedef ::linear_combination<Z> linear_combination;
|
||||||
typedef linear_combination_const_iter<Z> linear_combination_const_iter;
|
typedef ::linear_combination_const_iter<Z> linear_combination_const_iter;
|
||||||
|
|
||||||
enum steal { STEAL };
|
enum steal { STEAL };
|
||||||
|
|
||||||
|
@ -150,7 +150,9 @@ class Z
|
||||||
triple<Z, Z, Z> extended_gcd (const Z &z) const
|
triple<Z, Z, Z> extended_gcd (const Z &z) const
|
||||||
{
|
{
|
||||||
mpz_t d, s, t;
|
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);
|
mpz_gcdext (d, s, t, impl->x, z.impl->x);
|
||||||
return triple<Z, Z, Z> (Z (STEAL, d),
|
return triple<Z, Z, Z> (Z (STEAL, d),
|
||||||
Z (STEAL, s),
|
Z (STEAL, s),
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
class Z2
|
class Z2
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<Z2> linear_combination;
|
typedef ::linear_combination<Z2> linear_combination;
|
||||||
// typedef linear_combination_iter<Z2> linear_combination_iter;
|
// 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:
|
private:
|
||||||
bool v;
|
bool v;
|
||||||
|
|
|
@ -3,8 +3,8 @@ template<unsigned p>
|
||||||
class Zp
|
class Zp
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<Zp<p> > linear_combination;
|
typedef ::linear_combination<Zp<p> > linear_combination;
|
||||||
typedef linear_combination_const_iter<Zp<p> > linear_combination_const_iter;
|
typedef ::linear_combination_const_iter<Zp<p> > linear_combination_const_iter;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
unsigned v;
|
unsigned v;
|
||||||
|
|
|
@ -2,8 +2,8 @@
|
||||||
template<class T> class fraction_field
|
template<class T> class fraction_field
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<fraction_field> linear_combination;
|
typedef ::linear_combination<fraction_field> linear_combination;
|
||||||
typedef linear_combination_const_iter<fraction_field> linear_combination_const_iter;
|
typedef ::linear_combination_const_iter<fraction_field> linear_combination_const_iter;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
T num;
|
T num;
|
||||||
|
|
|
@ -93,7 +93,7 @@ class linear_combination
|
||||||
|
|
||||||
R annihilator () const;
|
R annihilator () const;
|
||||||
|
|
||||||
void set (R c, unsigned i)
|
void set_coeff (R c, unsigned i)
|
||||||
{
|
{
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
v -= i;
|
v -= i;
|
||||||
|
@ -348,7 +348,7 @@ class linear_combination<Z2>
|
||||||
return Z2 (operator == (0) ? 1 : 0);
|
return Z2 (operator == (0) ? 1 : 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
void set (Z2 c, unsigned i)
|
void set_coeff (Z2 c, unsigned i)
|
||||||
{
|
{
|
||||||
if (c == 0)
|
if (c == 0)
|
||||||
v -= i;
|
v -= i;
|
||||||
|
|
|
@ -529,9 +529,9 @@ quotient_helper<R>::improve_pivot_column (unsigned i, unsigned j, unsigned j2)
|
||||||
R rkc = rk(j),
|
R rkc = rk(j),
|
||||||
rkc2 = rk(j2);
|
rkc2 = rk(j2);
|
||||||
|
|
||||||
rk.set (rkc*t.second + rkc2*t.third,
|
rk.set_coeff (rkc*t.second + rkc2*t.third,
|
||||||
j);
|
j);
|
||||||
rk.set (rkc2*(rc.div (t.first)) - rkc*(rc2.div (t.first)),
|
rk.set_coeff (rkc2*(rc.div (t.first)) - rkc*(rc2.div (t.first)),
|
||||||
j2);
|
j2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -560,8 +560,8 @@ quotient_helper<R>::improve_pivot_column (unsigned i, unsigned j, unsigned j2)
|
||||||
R d = ginv(j),
|
R d = ginv(j),
|
||||||
d2 = ginv(j2);
|
d2 = ginv(j2);
|
||||||
|
|
||||||
ginv.set (t.second*d + t.third*d2, j);
|
ginv.set_coeff (t.second*d + t.third*d2, j);
|
||||||
ginv.set (rc.div (t.first) * d2 - rc2.div (t.first) * d, j2);
|
ginv.set_coeff (rc.div (t.first) * d2 - rc2.div (t.first) * d, j2);
|
||||||
}
|
}
|
||||||
|
|
||||||
#if 0
|
#if 0
|
||||||
|
|
|
@ -134,8 +134,8 @@ template<class T, unsigned n>
|
||||||
class multivariate_polynomial
|
class multivariate_polynomial
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
typedef linear_combination<multivariate_polynomial<T, n> > linear_combination;
|
typedef ::linear_combination<multivariate_polynomial<T, n> > linear_combination;
|
||||||
typedef linear_combination_const_iter<multivariate_polynomial<T, n> >
|
typedef ::linear_combination_const_iter<multivariate_polynomial<T, n> >
|
||||||
linear_combination_const_iter;
|
linear_combination_const_iter;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
|
@ -268,7 +268,7 @@ public:
|
||||||
pair<multivariate_polynomial, multivariate_polynomial>
|
pair<multivariate_polynomial, multivariate_polynomial>
|
||||||
uncommon_factors (multivariate_polynomial b, basedvector<multivariate_polynomial, 1> ds);
|
uncommon_factors (multivariate_polynomial b, basedvector<multivariate_polynomial, 1> ds);
|
||||||
maybe<multivariate_polynomial>
|
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;
|
multivariate_polynomial divide_exact (const multivariate_polynomial &d) const;
|
||||||
|
|
||||||
bool operator | (const multivariate_polynomial &num) const { abort (); }
|
bool operator | (const multivariate_polynomial &num) const { abort (); }
|
||||||
|
|
Loading…
Reference in New Issue