Package edu.jas.gb

Class CriticalPair<C extends RingElem<C>>

java.lang.Object
edu.jas.gb.AbstractPair<C>
edu.jas.gb.CriticalPair<C>
Type Parameters:
C - coefficient type
All Implemented Interfaces:
Serializable

public class CriticalPair<C extends RingElem<C>> extends AbstractPair<C>
Serializable subclass to hold critical pairs of polynomials. Used also to manage reduction status of the pair.
See Also:
  • Field Details

    • inReduction

      protected volatile boolean inReduction
    • reductum

      protected volatile GenPolynomial<C extends RingElem<C>> reductum
  • Constructor Details

    • CriticalPair

      public CriticalPair(ExpVector e, GenPolynomial<C> pi, GenPolynomial<C> pj, int i, int j)
      CriticalPair constructor.
      Parameters:
      e - lcm(lt(pi),lt(pj).
      pi - polynomial i.
      pj - polynomial j.
      i - index of pi.
      j - index pf pj.
  • Method Details

    • toString

      public String toString()
      toString.
      Overrides:
      toString in class AbstractPair<C extends RingElem<C>>
    • setInReduction

      public void setInReduction()
      Set in reduction status. inReduction is set to true.
    • getInReduction

      public boolean getInReduction()
      Get in reduction status.
      Returns:
      true if the polynomial is currently in reduction, else false.
    • getReductum

      public GenPolynomial<C> getReductum()
      Get reduced polynomial.
      Returns:
      the reduced polynomial or null if not done.
    • setReductum

      public void setReductum(GenPolynomial<C> r)
      Set reduced polynomial.
      Parameters:
      r - the reduced polynomial.
    • isZERO

      public boolean isZERO()
      Is reduced to zero.
      Returns:
      true if the S-polynomial of this CriticalPair was reduced to ZERO, else false.
    • isONE

      public boolean isONE()
      Is reduced to one.
      Returns:
      true if the S-polynomial of this CriticalPair was reduced to ONE, else false.