Class GBAlgorithmBuilder<C extends GcdRingElem<C>>

java.lang.Object
edu.jas.application.GBAlgorithmBuilder<C>
All Implemented Interfaces:
Serializable

public class GBAlgorithmBuilder<C extends GcdRingElem<C>> extends Object implements Serializable
Builder for commutative Gröbner bases algorithm implementations.

Usage: To create objects that implement the GroebnerBase interface one can use the GBFactory or this GBAlgorithmBuilder. This class will select and compose an appropriate implementation based on the types of polynomial coefficients C and the desired properties. To build an implementation start with the static method polynomialRing() to define the polynomial ring. Then continue to construct the algorithm with the methods

  • optimize() or optimize(boolean) for term order (variable order) optimization (true for return of permuted polynomials),
  • normalPairlist() (default), syzygyPairlist() or simplePairlist() for pair-list selection strategies,
  • fractionFree() for clearing denominators and computing with pseudo reduction,
  • graded() for using the FGLM algorithm to first compute a Gröbner base with respect to a graded term order and then constructing a Gröbner base wrt. a lexicographical term order,
  • walk() for using the Gröbner walk algorithm to first compute a Gröbner base with respect to a graded term order and then constructing a Gröbner base wrt. a lexicographical term order,
  • iterated() for using the iterative GB algorithm to compute a Gröbner base adding one polynomial after another,
  • F5(), GGV() and Arri() for using the respective iterative signature based GB algorithm (over field coefficients) to compute a Gröbner base adding one polynomial after another,
  • parallel() additionally compute a Gröbner base over a field or integral domain in parallel,
  • euclideanDomain() for computing a e-Gröbner base,
  • domainAlgorithm(Algo) for computing a d- or e-Gröbner base,

Finally call the method build() to obtain an implementation of class GroebnerBaseAbstract. For example

 GenPolynomialRing<C> pf = new GenPolynomialRing<C>(cofac, vars);
 GroebnerBaseAbstract<C> engine;
 engine = GBAlgorithmBuilder.<C> polynomialRing(pf).fractionFree().parallel().optimize().build();
 c = engine.GB(A);
 

For example, if the coefficient type is BigRational, the usage looks like

 GenPolynomialRing<BigRational> pf = new GenPolynomialRing<BigRational>(cofac, vars);
 GroebnerBaseAbstract<BigRational> engine;
 engine = GBAlgorithmBuilder.<BigRational> polynomialRing(pf).fractionFree().parallel().optimize().build();
 c = engine.GB(A);
 
Note: Not all combinations are meanigful
See Also:
  • Field Details

  • Constructor Details

    • GBAlgorithmBuilder

      protected GBAlgorithmBuilder()
      Constructor not for use.
    • GBAlgorithmBuilder

      public GBAlgorithmBuilder(GenPolynomialRing<C> ring)
      Constructor.
      Parameters:
      ring - the polynomial ring.
    • GBAlgorithmBuilder

      public GBAlgorithmBuilder(GenPolynomialRing<C> ring, GroebnerBaseAbstract<C> algo)
      Constructor.
      Parameters:
      ring - the polynomial ring.
      algo - already determined algorithm.
    • GBAlgorithmBuilder

      public GBAlgorithmBuilder(GenPolynomialRing<C> ring, GroebnerBaseAbstract<C> algo, PairList<C> strategy)
      Constructor.
      Parameters:
      ring - the polynomial ring.
      algo - already determined algorithm.
      strategy - pairlist strategy.
  • Method Details

    • build

      public GroebnerBaseAbstract<C> build()
      Build the GB algorithm implementation.
      Returns:
      GB algorithm implementation as GroebnerBaseAbstract object.
    • polynomialRing

      public static <C extends GcdRingElem<C>> GBAlgorithmBuilder<C> polynomialRing(GenPolynomialRing<C> fac)
      Define polynomial ring.
      Parameters:
      fac - the commutative polynomial ring.
      Returns:
      GBAlgorithmBuilder object.
    • syzygyPairlist

      public GBAlgorithmBuilder<C> syzygyPairlist()
      Select syzygy critical pair-list strategy. Gebauer and Möller algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • normalPairlist

      public GBAlgorithmBuilder<C> normalPairlist()
      Select normal critical pair-list strategy. Buchberger, Winkler and Kredel algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • simplePairlist

      public GBAlgorithmBuilder<C> simplePairlist()
      Select simple critical pair-list strategy. Original Buchberger algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • optimize

      public GBAlgorithmBuilder<C> optimize()
      Request term order optimization. Call optimize(true) for return of permuted polynomials.
      Returns:
      GBAlgorithmBuilder object.
    • optimize

      public GBAlgorithmBuilder<C> optimize(boolean rP)
      Request term order optimization.
      Parameters:
      rP - true for return of permuted polynomials, false for inverse permuted polynomials and new GB computation.
      Returns:
      GBAlgorithmBuilder object.
    • fractionFree

      public GBAlgorithmBuilder<C> fractionFree()
      Request fraction free algorithm. For BigRational and Quotient coefficients denominators are cleared and pseudo reduction is used.
      Returns:
      GBAlgorithmBuilder object.
    • euclideanDomain

      public GBAlgorithmBuilder<C> euclideanDomain()
      Request e-GB algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • domainAlgorithm

      public GBAlgorithmBuilder<C> domainAlgorithm(GBFactory.Algo a)
      Request d-, e- or i-GB algorithm.
      Parameters:
      a - algorithm from GBFactory.Algo.
      Returns:
      GBAlgorithmBuilder object.
    • parallel

      public GBAlgorithmBuilder<C> parallel()
      Request parallel algorithm. Additionally run a parallel algorithm via GBProxy.
      Returns:
      GBAlgorithmBuilder object.
    • parallel

      public GBAlgorithmBuilder<C> parallel(int threads)
      Request parallel algorithm. Additionally run a parallel algorithm via GBProxy.
      Parameters:
      threads - number of threads requested.
      Returns:
      GBAlgorithmBuilder object.
    • graded

      public GBAlgorithmBuilder<C> graded()
      Request FGLM algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • walk

      public GBAlgorithmBuilder<C> walk()
      Request Groebner walk algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • iterated

      public GBAlgorithmBuilder<C> iterated()
      Request iterated GB algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • F5

      public GBAlgorithmBuilder<C> F5()
      Request iterated F5 signature based GB algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • GGV

      public GBAlgorithmBuilder<C> GGV()
      Request iterated GGV signature based GB algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • Arri

      public GBAlgorithmBuilder<C> Arri()
      Request iterated Arri signature based GB algorithm.
      Returns:
      GBAlgorithmBuilder object.
    • toString

      public String toString()
      String representation of the GB algorithm implementation.
      Overrides:
      toString in class Object
      See Also:
    • toScript

      public String toScript()
      Get a scripting compatible string representation.
      Returns:
      script compatible representation for this Element.
      See Also: