Class SGCDParallelProxy<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.fd.GreatestCommonDivisorAbstract<C>
edu.jas.fd.SGCDParallelProxy<C>
- All Implemented Interfaces:
GreatestCommonDivisor<C>, Serializable
Solvable greatest common divisor parallel proxy. Executes methods from two
implementations in parallel and returns the result from the fastest run. Uses
timeout on 1
in case of timeout.
invokeAny() and return fake common divisor - See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final booleanfinal GreatestCommonDivisorAbstract<C> GCD engines.final GreatestCommonDivisorAbstract<C> final GreatestCommonDivisorAbstract<C> private static final org.apache.logging.log4j.Loggerprotected ExecutorServiceThread pool.Fields inherited from class GreatestCommonDivisorAbstract
coFac, syz -
Constructor Summary
ConstructorsConstructorDescriptionSGCDParallelProxy(RingFactory<C> cf, GreatestCommonDivisorAbstract<C> e1, GreatestCommonDivisorAbstract<C> e2) ParallelProxy constructor. -
Method Summary
Modifier and TypeMethodDescriptionLeft univariate GenSolvablePolynomial greatest common divisor.Left GenSolvablePolynomial greatest common divisor.leftRecursiveUnivariateGcd(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S) left univariate GenSolvablePolynomial recursive greatest common divisor.Right univariate GenSolvablePolynomial greatest common divisor.Right GenSolvablePolynomial greatest common divisor.rightRecursiveUnivariateGcd(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S) right univariate GenSolvablePolynomial recursive greatest common divisor.toString()Get the String representation with gcd engines.Methods inherited from class GreatestCommonDivisorAbstract
baseExtendedGcd, baseGcdDiophant, baseHalfExtendedGcd, baseRecursiveContent, baseRecursivePrimitivePart, divide, gcd, isLeftCoPrime, isLeftCoPrime, isLeftOreCond, isRightOreCond, leftBaseContent, leftBasePrimitivePart, leftContent, leftCoPrime, leftCoPrime, leftCoPrimeRec, leftGcd, leftGcd, leftGcdCofactors, leftLcm, leftOreCond, leftOreCond, leftPrimitivePart, leftRecursiveContent, leftRecursiveGcd, leftRecursivePrimitivePart, recursiveContent, rightBaseContent, rightBasePrimitivePart, rightContent, rightDivide, rightGcd, rightGcdCofactors, rightLcm, rightOreCond, rightOreCond, rightPrimitivePart, rightRecursiveContent, rightRecursiveGcd, rightRecursivePrimitivePart
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
e0
GCD engines. -
e1
-
e2
-
pool
Thread pool.
-
-
Constructor Details
-
SGCDParallelProxy
public SGCDParallelProxy(RingFactory<C> cf, GreatestCommonDivisorAbstract<C> e1, GreatestCommonDivisorAbstract<C> e2) ParallelProxy constructor.- Parameters:
cf- coefficient ring.
-
-
Method Details
-
toString
Get the String representation with gcd engines.- Overrides:
toStringin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- See Also:
-
leftBaseGcd
Left univariate GenSolvablePolynomial greatest common divisor.- Specified by:
leftBaseGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- univariate GenSolvablePolynomial.S- univariate GenSolvablePolynomial.- Returns:
- gcd(P,S).
-
leftRecursiveUnivariateGcd
public GenSolvablePolynomial<GenPolynomial<C>> leftRecursiveUnivariateGcd(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S) left univariate GenSolvablePolynomial recursive greatest common divisor.- Specified by:
leftRecursiveUnivariateGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- univariate recursive GenSolvablePolynomial.S- univariate recursive GenSolvablePolynomial.- Returns:
- gcd(P,S).
-
leftGcd
Left GenSolvablePolynomial greatest common divisor.- Specified by:
leftGcdin interfaceGreatestCommonDivisor<C extends GcdRingElem<C>>- Overrides:
leftGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- GenSolvablePolynomial.S- GenSolvablePolynomial.- Returns:
- leftGcd(P,S).
-
rightBaseGcd
public GenSolvablePolynomial<C> rightBaseGcd(GenSolvablePolynomial<C> P, GenSolvablePolynomial<C> S) Right univariate GenSolvablePolynomial greatest common divisor.- Specified by:
rightBaseGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- univariate GenSolvablePolynomial.S- univariate GenSolvablePolynomial.- Returns:
- gcd(P,S).
-
rightRecursiveUnivariateGcd
public GenSolvablePolynomial<GenPolynomial<C>> rightRecursiveUnivariateGcd(GenSolvablePolynomial<GenPolynomial<C>> P, GenSolvablePolynomial<GenPolynomial<C>> S) right univariate GenSolvablePolynomial recursive greatest common divisor.- Specified by:
rightRecursiveUnivariateGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- univariate recursive GenSolvablePolynomial.S- univariate recursive GenSolvablePolynomial.- Returns:
- gcd(P,S).
-
rightGcd
Right GenSolvablePolynomial greatest common divisor.- Specified by:
rightGcdin interfaceGreatestCommonDivisor<C extends GcdRingElem<C>>- Overrides:
rightGcdin classGreatestCommonDivisorAbstract<C extends GcdRingElem<C>>- Parameters:
P- GenSolvablePolynomial.S- GenSolvablePolynomial.- Returns:
- rightGcd(P,S).
-