Package edu.jas.application
Class GBAlgorithmBuilder<C extends GcdRingElem<C>>
- java.lang.Object
-
- edu.jas.application.GBAlgorithmBuilder<C>
-
- All Implemented Interfaces:
java.io.Serializable
public class GBAlgorithmBuilder<C extends GcdRingElem<C>> extends java.lang.Object implements java.io.Serializable
Builder for commutative Gröbner bases algorithm implementations.Usage: To create objects that implement the
GroebnerBase
interface one can use theGBFactory
or thisGBAlgorithmBuilder
. 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 methodpolynomialRing()
to define the polynomial ring. Then continue to construct the algorithm with the methodsoptimize()
oroptimize(boolean)
for term order (variable order) optimization (true for return of permuted polynomials),normalPairlist()
(default),syzygyPairlist()
orsimplePairlist()
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()
andArri()
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 classGroebnerBaseAbstract
. For exampleGenPolynomialRing<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- Author:
- Heinz Kredel
- See Also:
GroebnerBase
,GBFactory
, Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
GBAlgorithmBuilder()
Constructor not for use.GBAlgorithmBuilder(GenPolynomialRing<C> ring)
Constructor.GBAlgorithmBuilder(GenPolynomialRing<C> ring, GroebnerBaseAbstract<C> algo)
Constructor.GBAlgorithmBuilder(GenPolynomialRing<C> ring, GroebnerBaseAbstract<C> algo, PairList<C> strategy)
Constructor.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description GBAlgorithmBuilder<C>
Arri()
Request iterated Arri signature based GB algorithm.GroebnerBaseAbstract<C>
build()
Build the GB algorithm implementation.GBAlgorithmBuilder<C>
domainAlgorithm(GBFactory.Algo a)
Request d-, e- or i-GB algorithm.GBAlgorithmBuilder<C>
euclideanDomain()
Request e-GB algorithm.GBAlgorithmBuilder<C>
F5()
Request iterated F5 signature based GB algorithm.GBAlgorithmBuilder<C>
fractionFree()
Request fraction free algorithm.GBAlgorithmBuilder<C>
GGV()
Request iterated GGV signature based GB algorithm.GBAlgorithmBuilder<C>
graded()
Request FGLM algorithm.GBAlgorithmBuilder<C>
iterated()
Request iterated GB algorithm.GBAlgorithmBuilder<C>
normalPairlist()
Select normal critical pair-list strategy.GBAlgorithmBuilder<C>
optimize()
Request term order optimization.GBAlgorithmBuilder<C>
optimize(boolean rP)
Request term order optimization.GBAlgorithmBuilder<C>
parallel()
Request parallel algorithm.GBAlgorithmBuilder<C>
parallel(int threads)
Request parallel algorithm.static <C extends GcdRingElem<C>>
GBAlgorithmBuilder<C>polynomialRing(GenPolynomialRing<C> fac)
Define polynomial ring.GBAlgorithmBuilder<C>
simplePairlist()
Select simple critical pair-list strategy.GBAlgorithmBuilder<C>
syzygyPairlist()
Select syzygy critical pair-list strategy.java.lang.String
toScript()
Get a scripting compatible string representation.java.lang.String
toString()
String representation of the GB algorithm implementation.GBAlgorithmBuilder<C>
walk()
Request Groebner walk algorithm.
-
-
-
Field Detail
-
ring
public final GenPolynomialRing<C extends GcdRingElem<C>> ring
The current polynomial ring.
-
strategy
public final PairList<C extends GcdRingElem<C>> strategy
Requested pairlist strategy.
-
-
Constructor Detail
-
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 Detail
-
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 java.lang.String toString()
String representation of the GB algorithm implementation.- Overrides:
toString
in classjava.lang.Object
- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.- Returns:
- script compatible representation for this Element.
- See Also:
Element.toScript()
-
-