Exemple #1
0
int
polyjam::core::Monomial::grevlexComparison(
    const Monomial & operant ) const
{
  if( isIncompatible(operant) )
    return 0;

  unsigned int thisDegree = degree();
  unsigned int thatDegree = operant.degree();

  if( thisDegree == thatDegree )
    return revlexComparison(operant);
  else
  {
    if( thisDegree > thatDegree )
      return 1;
    else
      return -1;
  }

  return 0;
}
Exemple #2
0
Polynomial::Polynomial(Monomial m)
{
  mMonomials.resize(m.degree() + 1, Monomial("0", 0));
  mMonomials[m.degree()] = m;
}
Exemple #3
0
Monomial::Monomial(const Monomial& rhs)
{
  mCoeffR = rhs.coefficientReal();
  mCoeffI = rhs.coefficientImag();
  mDegree = rhs.degree();
}