capitalizing polynomial and monomial

parent 04b4967c
......@@ -22,11 +22,11 @@ template <class T>
void launchF4(istream &in, ostream &out) {
log(LOG_INFO) << "begin parsing" << endl;
Parser<T> pp(in);
vector<polynomial<T> > sys = pp.parse();
vector<Polynomial<T> > sys = pp.parse();
log(LOG_INFO) << "parsing done" << endl;
vector<polynomial<T> > G;
vector<Polynomial<T> > G;
F4<T>(sys, G);
for (typename std::vector<polynomial <T>>::const_iterator it = G.begin(); \
for (typename std::vector<Polynomial <T>>::const_iterator it = G.begin(); \
it != G.end(); ++it) {
it->print(out);
out << std::endl;
......
......@@ -15,15 +15,15 @@
namespace tinygb {
template <class T>
void F4(const std::vector<polynomial<T> > &sys,
std::vector<polynomial<T> > &GB);
void F4(const std::vector<Polynomial<T> > &sys,
std::vector<Polynomial<T> > &GB);
template <class T>
bool gb_is_minimal(const std::vector<polynomial<T> >&);
bool gb_is_minimal(const std::vector<Polynomial<T> >&);
// test whether a GB is minimal
template <class T>
bool gb_is_minimal(const vector<polynomial<T> > &GB) {
bool gb_is_minimal(const vector<Polynomial<T> > &GB) {
for (unsigned i = 0; i < GB.size(); ++i)
for (unsigned j = 0; j < GB.size(); ++j)
if (i != j && GB[i].LM().isDivisibleBy(GB[j].LM()))
......@@ -71,7 +71,7 @@ void gebmol_gb_insert(list<critpair<T> > &vCrit, vector<polymat<T> > &G,
critpair<T> cp1 = S1[S1.size() - 1];
S1.erase(S1.end()-1);
bool flag = false;
monomial tmp_lcm = cp1.LCM();
Monomial tmp_lcm = cp1.LCM();
for (auto& it : std::as_const(S0)) {
if (tmp_lcm.isDivisibleBy(it.LCM())) {
flag = true;
......@@ -149,7 +149,7 @@ unsigned F4_critpair_selection(list<critpair<T> > &vCrit_step,
// interreduce a list of polynomials (linear algebra)
template <class T>
void interreduce(list<polymat<T> > &Ginit, vector<matrixF4<T>* > &vMat,
list<polynomial<T> > &_P) {
list<Polynomial<T> > &_P) {
log(LOG_INFO) << "interreducing --- ";
for (auto& it : _P)
it.set_monic();
......@@ -169,12 +169,12 @@ void interreduce(list<polymat<T> > &Ginit, vector<matrixF4<T>* > &vMat,
template <class T>
void F4_reductors_selection(const list<critpair<T> > &vCrit_step,
const list<polymat<T> > &globred,
vector<pair<monomial, polymat<T> > > &reductors) {
vector<pair<Monomial, polymat<T> > > &reductors) {
reductors.clear();
polymat<T> reductor;
typename list<polymat<T> >::const_iterator itred;
polynomial<T> tmp;
set<monomial> lM;
Polynomial<T> tmp;
set<Monomial> lM;
for (auto& it : std::as_const(vCrit_step)) {
tmp = it.eval();
for (auto& it2 : std::as_const(tmp.get_vp()))
......@@ -183,7 +183,7 @@ void F4_reductors_selection(const list<critpair<T> > &vCrit_step,
bool flag;
while (!lM.empty()) {
monomial m = *(lM.rbegin());
Monomial m = *(lM.rbegin());
flag = false;
for (auto it = std::as_const(globred).begin();
it != std::as_const(globred).end();
......@@ -199,7 +199,7 @@ void F4_reductors_selection(const list<critpair<T> > &vCrit_step,
}
if (flag) {
reductor = polymat<T> (*itred);
reductors.push_back(pair<monomial, polymat<T> >(m/reductor.get_LM(),
reductors.push_back(pair<Monomial, polymat<T> >(m/reductor.get_LM(),
reductor));
reductor.merge_sets(lM, m/reductor.get_LM());
}
......@@ -209,7 +209,7 @@ void F4_reductors_selection(const list<critpair<T> > &vCrit_step,
// toplevel F4
template <class T>
void F4(const vector<polynomial<T> > &sys, vector<polynomial<T> > &res) {
void F4(const vector<Polynomial<T> > &sys, vector<Polynomial<T> > &res) {
log(LOG_INFO) << "beginning F4: " << endl;
for (auto it = sys.begin(); it != sys.end(); ++it)
......@@ -226,9 +226,9 @@ void F4(const vector<polynomial<T> > &sys, vector<polynomial<T> > &res) {
vector<matrixF4<T>*> vMat;
list<polymat<T> > global_reductors;
vector<pair<monomial, polymat<T> > > reductors;
vector<pair<Monomial, polymat<T> > > reductors;
list<polynomial<T> > _G;
list<Polynomial<T> > _G;
for (unsigned i = 0; i < sys.size(); ++i)
_G.push_back(sys[i]);
......@@ -264,7 +264,7 @@ void F4(const vector<polynomial<T> > &sys, vector<polynomial<T> > &res) {
F4_reductors_selection(vCrit_step, global_reductors, reductors);
F4timers::timeSelectReductors.stop();
list<pair<monomial, polymat<T> > > lmat;
list<pair<Monomial, polymat<T> > > lmat;
for (auto& it : as_const(reductors)) {
lmat.push_back(it);
}
......@@ -325,7 +325,7 @@ void F4(const vector<polynomial<T> > &sys, vector<polynomial<T> > &res) {
log(LOG_INFO) << "------------ cleaning reductors -----------" << endl;
global_reductors.clear();
polynomial<T> tmp_P;
Polynomial<T> tmp_P;
res.clear();
for (unsigned i = 0; i < G.size(); ++i) {
G[i].to_polynomial(tmp_P);
......
......@@ -5,6 +5,7 @@
#include <utility>
#include "./monomial.h"
#include "./polymat.h"
#include "./polynomial.h"
namespace tinygb {
......@@ -19,33 +20,33 @@ class critpair {
#ifdef BILIN
unsigned degreebilin;
#endif
std::pair<monomial, polymat<T> > S1;
std::pair<monomial, polymat<T> > S2;
monomial _LCM;
std::pair<Monomial, polymat<T> > S1;
std::pair<Monomial, polymat<T> > S2;
Monomial _LCM;
public:
critpair(const polymat<T> &p1, const polymat<T> &p2);
const std::pair<monomial, polymat<T> >& get_S1() const {
const std::pair<Monomial, polymat<T> >& get_S1() const {
return S1;
}
const std::pair<monomial, polymat<T> >& get_S2() const {
const std::pair<Monomial, polymat<T> >& get_S2() const {
return S2;
}
monomial LCM() const {
Monomial LCM() const {
return _LCM;
}
#ifdef BILIN
unsigned degree_bilin() {
if (degreebilin == 0) {
set<monomial> setmon;
set<Monomial> setmon;
S1.second.merge_sets(setmon, S1.first);
S2.second.merge_sets(setmon, S2.first);
degreebilin = 0;
for (set<monomial>::const_iterator it = setmon.begin();
for (set<Monomial>::const_iterator it = setmon.begin();
it != setmon.end(); ++it)
if (it->degree_bilin() > degreebilin)
degreebilin = it->degree_bilin();
......@@ -56,7 +57,7 @@ class critpair {
unsigned degree() const {return S1.second.degree()+S1.first.degree();}
#endif
polynomial<T> eval() const;
Polynomial<T> eval() const;
bool operator<(critpair<T> &cp2);
bool operator==(const critpair<T> &cp2) const;
friend std::ostream& operator<< <T>(std::ostream&, const critpair<T>&);
......@@ -64,9 +65,9 @@ class critpair {
template <class T>
critpair<T>::critpair(const polymat<T> &p1, const polymat<T> &p2) {
pair<monomial, monomial> c = p1.get_LM().cofact(p2.get_LM());
S1 = pair<monomial, polymat<T> >(c.first, p1);
S2 = pair<monomial, polymat<T> >(c.second, p2);
pair<Monomial, Monomial> c = p1.get_LM().cofact(p2.get_LM());
S1 = pair<Monomial, polymat<T> >(c.first, p1);
S2 = pair<Monomial, polymat<T> >(c.second, p2);
_LCM = S1.first*S1.second.get_LM();
#ifdef BILIN
degreebilin = 0;
......@@ -88,7 +89,7 @@ bool critpair<T>::operator<(critpair<T> &cp2) {
#endif
template <class T>
ostream& operator<<(ostream& o, const pair<monomial, polymat<T> > P) {
ostream& operator<<(ostream& o, const pair<Monomial, polymat<T> > P) {
o << "(" << P.first << "," << P.second << ")";
return o;
}
......@@ -100,8 +101,8 @@ ostream& operator<<(ostream& o, const critpair<T> & cp) {
}
template <class T>
polynomial<T> critpair<T>::eval() const {
polynomial<T> tmp, R;
Polynomial<T> critpair<T>::eval() const {
Polynomial<T> tmp, R;
S1.second.to_polynomial(tmp);
tmp = tmp*S1.first;
S2.second.to_polynomial(R);
......
......@@ -35,12 +35,12 @@ class matrix_rowmajor {
val.shrink_to_fit();
}
matrix_rowmajor(const std::list<std::pair<monomial, polymat<T> > > &_PP,
const std::vector<monomial> &vM);
matrix_rowmajor(const std::list<std::pair<Monomial, polymat<T> > > &_PP,
const std::vector<Monomial> &vM);
matrix_rowmajor(const std::list<critpair<T> > &critpairP,
const std::vector<monomial> &vM);
matrix_rowmajor(const std::vector<polynomial<T> > &PP,
const std::vector<monomial> &vM);
const std::vector<Monomial> &vM);
matrix_rowmajor(const std::vector<Polynomial<T> > &PP,
const std::vector<Monomial> &vM);
unsigned get_rsize() const {
return rsize;
......@@ -98,8 +98,8 @@ class sparse_uptriang_matrix {
public:
std::vector<sparsemat_elt<T> > list_elts;
sparse_uptriang_matrix(): rsize(0), csize(0) {}
sparse_uptriang_matrix(const std::list<std::pair<monomial, polymat<T> > >&,
const std::vector<monomial>&);
sparse_uptriang_matrix(const std::list<std::pair<Monomial, polymat<T> > >&,
const std::vector<Monomial>&);
~sparse_uptriang_matrix();
const std::vector<unsigned>& get_nbelts() const {
......@@ -125,7 +125,7 @@ class matrixF4 {
unsigned csize;
unsigned Asize;
std::vector<monomial> v1, v2, pivots_LM;
std::vector<Monomial> v1, v2, pivots_LM;
sparse_uptriang_matrix<T> *A;
matrix_rowmajor<T> *B;
......@@ -136,9 +136,9 @@ class matrixF4 {
matrixF4()
: rsize(0), csize(0), Asize(0), A(NULL), B(NULL), C(NULL), D(NULL) {}
explicit matrixF4(const std::list<polynomial<T> >& _PP);
explicit matrixF4(const std::list<Polynomial<T> >& _PP);
matrixF4(std::list<std::pair<monomial, polymat<T> > >&,
matrixF4(std::list<std::pair<Monomial, polymat<T> > >&,
std::list<critpair<T> >&);
~matrixF4() {
......@@ -155,13 +155,13 @@ class matrixF4 {
const unsigned& get_Asize() const {
return Asize;
}
const std::vector<monomial>& get_v1() const {
const std::vector<Monomial>& get_v1() const {
return v1;
}
const std::vector<monomial>& get_v2() const {
const std::vector<Monomial>& get_v2() const {
return v2;
}
const std::vector<monomial>& get_pivots_LM() const {
const std::vector<Monomial>& get_pivots_LM() const {
return pivots_LM;
}
const sparse_uptriang_matrix<T>* get_A() const {
......
......@@ -8,8 +8,8 @@
namespace tinygb {
bool operator<(const std::pair<monomial, unsigned> &mm1,
const std::pair<monomial, unsigned> &mm2) {
bool operator<(const std::pair<Monomial, unsigned> &mm1,
const std::pair<Monomial, unsigned> &mm2) {
if (mm2.first < mm1.first)
return false;
if (mm1.first < mm2.first)
......@@ -17,8 +17,8 @@ bool operator<(const std::pair<monomial, unsigned> &mm1,
return mm1.second < mm2.second;
}
bool operator==(const std::pair<monomial, unsigned> &mm1,
const std::pair<monomial, unsigned> &mm2) {
bool operator==(const std::pair<Monomial, unsigned> &mm1,
const std::pair<Monomial, unsigned> &mm2) {
return mm1.first == mm2.first;
}
......@@ -71,17 +71,17 @@ template<class T>
void matrixF4<T>::print() const {
log(LOG_INFO) << "printing the matrix" << std::endl;
log(LOG_INFO) << "v1: ";
for (std::vector<monomial>::const_iterator it = v1.begin();
for (std::vector<Monomial>::const_iterator it = v1.begin();
it != v1.end(); ++it)
log(LOG_INFO) << *it << " ";
log(LOG_INFO) << std::endl;
log(LOG_INFO) << "v2: ";
for (std::vector<monomial>::const_iterator it = v2.begin();
for (std::vector<Monomial>::const_iterator it = v2.begin();
it != v2.end(); ++it)
log(LOG_INFO) << *it << " ";
log(LOG_INFO) << std::endl;
log(LOG_INFO) << "pivots: ";
for (std::vector<monomial>::const_iterator it = pivots_LM.begin();
for (std::vector<Monomial>::const_iterator it = pivots_LM.begin();
it != pivots_LM.end(); ++it)
log(LOG_INFO) << *it << " ";
log(LOG_INFO) << std::endl;
......@@ -104,7 +104,7 @@ void matrixF4<T>::print() const {
template<class T>
void matrixF4<T>::compress(std::list<unsigned> &pivots) {
this->pivots_LM.clear();
std::vector<monomial> vvv;
std::vector<Monomial> vvv;
for (std::list<unsigned>::const_iterator it = pivots.begin();
it != pivots.end(); ++it)
this->pivots_LM.push_back(v2[*it]);
......@@ -275,23 +275,23 @@ void matrix_interleaved<T>::_multiply_sub(T* res_val,
template <class T>
sparse_uptriang_matrix<T>::sparse_uptriang_matrix(
const std::list<std::pair<monomial, polymat<T> > > &_PP,
const std::vector<monomial> &vM) {
const std::list<std::pair<Monomial, polymat<T> > > &_PP,
const std::vector<Monomial> &vM) {
nbeltsbyrow.clear();
rsize = _PP.size();
csize = vM.size();
nbeltsbyrow.assign(csize, 0);
polynomial<T> tmp;
std::map<monomial, unsigned> map_mon;
Polynomial<T> tmp;
std::map<Monomial, unsigned> map_mon;
for (unsigned i = 0; i < vM.size(); ++i)
map_mon.insert(std::pair<monomial, unsigned>(vM[i], i));
map_mon.insert(std::pair<Monomial, unsigned>(vM[i], i));
list_elts.clear();
unsigned num_pol = rsize - 1;
for (typename std::list<std::pair<monomial, polymat<T> > >
for (typename std::list<std::pair<Monomial, polymat<T> > >
::const_reverse_iterator it = _PP.rbegin(); it != _PP.rend(); ++it) {
it->second.to_polynomial(tmp);
tmp = tmp*(it->first);
for (typename std::list<std::pair<monomial, T> >::
for (typename std::list<std::pair<Monomial, T> >::
const_iterator it2 = tmp.get_vp().begin();
it2 != --(tmp.get_vp().end()); ++it2)
if (map_mon.count(it2->first)) {
......@@ -323,23 +323,23 @@ sparse_uptriang_matrix<T>::~sparse_uptriang_matrix() {
template<class T>
matrix_rowmajor<T>::matrix_rowmajor(
const std::list<std::pair<monomial, polymat<T> > > &_PP,
const std::vector<monomial> &vM) {
const std::list<std::pair<Monomial, polymat<T> > > &_PP,
const std::vector<Monomial> &vM) {
F4timers::timeMatrixConstruct.start();
rsize = _PP.size();
csize = vM.size();
polynomial<T> tmp;
std::map<monomial, unsigned> map_mon;
Polynomial<T> tmp;
std::map<Monomial, unsigned> map_mon;
for (unsigned i = 0; i < vM.size(); ++i)
map_mon.insert(std::pair<monomial, unsigned>(vM[i], i));
map_mon.insert(std::pair<Monomial, unsigned>(vM[i], i));
val.resize(rsize*csize);
val.shrink_to_fit();
unsigned num_pol = 0;
for (typename std::list<std::pair<monomial, polymat<T> > >
for (typename std::list<std::pair<Monomial, polymat<T> > >
::const_iterator it = _PP.begin(); it != _PP.end(); ++it) {
it->second.to_polynomial(tmp);
tmp = tmp*(it->first);
for (typename std::list<std::pair<monomial, T> >
for (typename std::list<std::pair<Monomial, T> >
::const_iterator it2 = tmp.get_vp().begin();
it2 != tmp.get_vp().end(); ++it2)
if (map_mon.count(it2->first))
......@@ -351,14 +351,14 @@ matrix_rowmajor<T>::matrix_rowmajor(
template<class T>
matrix_rowmajor<T>::matrix_rowmajor(const std::list<critpair<T> > &critpairP,
const std::vector<monomial> &vM) {
const std::vector<Monomial> &vM) {
F4timers::timeMatrixConstruct.start();
rsize = critpairP.size();
csize = vM.size();
polynomial<T> tmp;
std::map<monomial, unsigned> map_mon;
Polynomial<T> tmp;
std::map<Monomial, unsigned> map_mon;
for (unsigned i = 0; i < vM.size(); ++i)
map_mon.insert(std::pair<monomial, unsigned>(vM[i], i));
map_mon.insert(std::pair<Monomial, unsigned>(vM[i], i));
val.resize(rsize*csize);
val.shrink_to_fit();
unsigned num_pol = 0;
......@@ -366,7 +366,7 @@ matrix_rowmajor<T>::matrix_rowmajor(const std::list<critpair<T> > &critpairP,
critpairP.begin();
it != critpairP.end(); ++it) {
tmp = it->eval();
for (typename std::list<std::pair<monomial, T> >
for (typename std::list<std::pair<Monomial, T> >
::const_iterator it2 = tmp.get_vp().begin();
it2 != tmp.get_vp().end(); ++it2)
if (map_mon.count(it2->first))
......@@ -503,25 +503,25 @@ void matrix_rowmajor<T>::remove_columns(const std::list<unsigned> &pivots) {
}
template<class T>
matrixF4<T>::matrixF4(const std::list<polynomial<T> > &_PP) {
matrixF4<T>::matrixF4(const std::list<Polynomial<T> > &_PP) {
Asize = 0;
rsize = _PP.size();
std::vector<polynomial<T> > PP;
std::vector<Polynomial<T> > PP;
for (typename std::list<polynomial<T> >::const_iterator it = _PP.begin();
for (typename std::list<Polynomial<T> >::const_iterator it = _PP.begin();
it != _PP.end(); ++it)
PP.push_back(*it);
std::set<monomial> lv;
std::set<Monomial> lv;
for (unsigned i = 0; i < PP.size(); ++i)
for (typename std::list<std::pair<monomial, T> >
for (typename std::list<std::pair<Monomial, T> >
::const_iterator it = PP[i].get_vp().begin();
it != PP[i].get_vp().end(); ++it)
lv.insert(it->first);
v1.clear(); v2.clear();
for (std::set<monomial>::const_reverse_iterator it = lv.rbegin();
for (std::set<Monomial>::const_reverse_iterator it = lv.rbegin();
it != lv.rend(); ++it)
v2.push_back(*it);
......@@ -535,17 +535,17 @@ matrixF4<T>::matrixF4(const std::list<polynomial<T> > &_PP) {
}
template<class T>
matrix_rowmajor<T>::matrix_rowmajor(const std::vector<polynomial<T> > &PP,
const std::vector<monomial> &vM) {
matrix_rowmajor<T>::matrix_rowmajor(const std::vector<Polynomial<T> > &PP,
const std::vector<Monomial> &vM) {
rsize = PP.size();
csize = vM.size();
std::map<monomial, unsigned> map_mon;
std::map<Monomial, unsigned> map_mon;
for (unsigned i = 0; i < vM.size(); ++i)
map_mon.insert(std::pair<monomial, unsigned>(vM[i], i));
map_mon.insert(std::pair<Monomial, unsigned>(vM[i], i));
val.resize(rsize*csize);
val.shrink_to_fit();
for (unsigned num_pol = 0; num_pol < rsize; ++num_pol)
for (typename std::list<std::pair<monomial, T> >
for (typename std::list<std::pair<Monomial, T> >
::const_iterator it = PP[num_pol].get_vp().begin();
it != PP[num_pol].get_vp().end(); ++it)
if (map_mon.count(it->first))
......@@ -553,16 +553,16 @@ matrix_rowmajor<T>::matrix_rowmajor(const std::vector<polynomial<T> > &PP,
}
template<class T>
matrixF4<T>::matrixF4(std::list<std::pair<monomial, polymat<T> > > &_PP,
matrixF4<T>::matrixF4(std::list<std::pair<Monomial, polymat<T> > > &_PP,
std::list<critpair<T> > &critpairP) {
v1.clear();
v2.clear();
Asize = _PP.size();
std::map<monomial, unsigned> vvM;
std::map<Monomial, unsigned> vvM;
std::set<monomial> lv1, lv2, tlv2;
std::set<Monomial> lv1, lv2, tlv2;
for (typename std::list<std::pair<monomial, polymat<T> > >
for (typename std::list<std::pair<Monomial, polymat<T> > >
::const_iterator itPP = _PP.begin(); itPP != _PP.end(); ++itPP) {
lv1.insert((itPP->second.get_LM())*itPP->first);
itPP->second.merge_sets(tlv2, itPP->first);
......@@ -579,10 +579,10 @@ matrixF4<T>::matrixF4(std::list<std::pair<monomial, polymat<T> > > &_PP,
std::set_difference(tlv2.begin(), tlv2.end(), lv1.begin(), lv1.end(),
std::inserter(lv2, lv2.end()));
for (std::set<monomial>::const_iterator it = lv1.begin();
for (std::set<Monomial>::const_iterator it = lv1.begin();
it != lv1.end(); ++it)
v1.push_back(*it);
for (std::set<monomial>::const_iterator it = lv2.begin();
for (std::set<Monomial>::const_iterator it = lv2.begin();
it != lv2.end(); ++it)
v2.push_back(*it);
......
......@@ -25,14 +25,14 @@ typedef expo_int* monomial_carrier;
typedef expo_int monomial_carrier[NBVAR];
#endif
class monomial {
class Monomial {
monomial_carrier exp;
public:
explicit monomial(const monomial_carrier _exp);
monomial(const monomial& m2);
monomial();
~monomial();
explicit Monomial(const monomial_carrier _exp);
Monomial(const Monomial& m2);
Monomial();
~Monomial();
inline expo_int degree() const;
......@@ -40,33 +40,33 @@ class monomial {
expo_int degree_bilin() const;
#endif
monomial& operator=(const monomial& m2);
Monomial& operator=(const Monomial& m2);
monomial operator*(const monomial&) const;
void operator*=(const monomial&);
monomial operator/(const monomial&) const;
Monomial operator*(const Monomial&) const;
void operator*=(const Monomial&);
Monomial operator/(const Monomial&) const;
inline bool operator<(const monomial&) const;
bool operator!=(const monomial&) const;
bool operator==(const monomial&) const;
inline bool operator<(const Monomial&) const;
bool operator!=(const Monomial&) const;
bool operator==(const Monomial&) const;
monomial LCM(const monomial&) const;
std::pair<monomial, monomial> cofact(const monomial&) const;
inline bool isDivisibleBy(const monomial&) const;
Monomial LCM(const Monomial&) const;
std::pair<Monomial, Monomial> cofact(const Monomial&) const;
inline bool isDivisibleBy(const Monomial&) const;
void print(std::ostream&) const;
friend std::ostream& operator<<(std::ostream&, const monomial&);
friend std::ostream& operator<<(std::ostream&, const Monomial&);
};
// ordering on terms
template <class T>
inline bool operator<(const std::pair<monomial, T> &p1,
const std::pair<monomial, T> &p2) {
inline bool operator<(const std::pair<Monomial, T> &p1,
const std::pair<Monomial, T> &p2) {
return p1.first < p2.first;
}
monomial::monomial(const monomial_carrier _exp) {
Monomial::Monomial(const monomial_carrier _exp) {
#ifndef NBVAR
exp = new expo_int[NBVAR];
#endif
......@@ -74,7 +74,7 @@ monomial::monomial(const monomial_carrier _exp) {
exp[i] = _exp[i];
}
monomial::monomial(const monomial& m2) {
Monomial::Monomial(const Monomial& m2) {
#ifndef NBVAR
exp = new expo_int[NBVAR];
#endif
......@@ -82,7 +82,7 @@ monomial::monomial(const monomial& m2) {
exp[i] = m2.exp[i];
}
monomial::monomial() {
Monomial::Monomial() {
#ifndef NBVAR
exp = new expo_int[NBVAR];
#endif
......@@ -90,13 +90,13 @@ monomial::monomial() {
exp[i] = 0;
}
monomial::~monomial() {
Monomial::~Monomial() {
#ifndef NBVAR