Class Local<C extends GcdRingElem<C>>
java.lang.Object
edu.jas.application.Local<C>
- All Implemented Interfaces:
AbelianGroupElem<Local<C>>, Element<Local<C>>, MonoidElem<Local<C>>, QuotPair<GenPolynomial<C>>, RingElem<Local<C>>, Serializable, Comparable<Local<C>>
public class Local<C extends GcdRingElem<C>>
extends Object
implements RingElem<Local<C>>, QuotPair<GenPolynomial<C>>
Local ring element based on GenPolynomial with RingElem interface. Objects of
this class are (nearly) immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final booleanprotected final GenPolynomial<C> Denominator part of the element data structure.protected intFlag to remember if this local element is a unit.private static final org.apache.logging.log4j.Loggerprotected final GenPolynomial<C> Numerator part of the element data structure.Local class factory data structure. -
Constructor Summary
ConstructorsModifierConstructorDescriptionThe constructor creates a Local object from a ring factory.Local(LocalRing<C> r, GenPolynomial<C> n) The constructor creates a Local object from a ring factory and a numerator polynomial.Local(LocalRing<C> r, GenPolynomial<C> n, GenPolynomial<C> d) The constructor creates a Local object from a ring factory and a numerator and denominator polynomial.protectedLocal(LocalRing<C> r, GenPolynomial<C> n, GenPolynomial<C> d, boolean isred) The constructor creates a Local object from a ring factory and a numerator and denominator polynomial. -
Method Summary
Modifier and TypeMethodDescriptionabs()Local absolute value.intLocal comparison.copy()Clone this.Denominator.Local division.Extended greatest common divisor.booleanComparison with any other object.factory()Get the corresponding element factory.Greatest common divisor.inthashCode()Hash code for this local.inverse()Local inverse.booleanIs Qoutient a constant.booleanisONE()Is Local one.booleanisUnit()Is Local unit.booleanisZERO()Is Local zero.monic()Local monic.Local multiplication by coefficient.Local multiplication.Local multiplication by exponent.multiply(GenPolynomial<C> b) Local multiplication by GenPolynomial.negate()Local negate.Numerator.Local remainder.intsignum()Local signum.Local subtraction.Local summation.toScript()Get a scripting compatible string representation.Get a scripting compatible string representation of the factory.toString()Get the String representation as RingElem.Methods inherited from interface MonoidElem
leftDivide, leftRemainder, power, quotientRemainder, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
debug
private static final boolean debug -
ring
Local class factory data structure. -
num
Numerator part of the element data structure. -
den
Denominator part of the element data structure. -
isunit
protected int isunitFlag to remember if this local element is a unit. -1 is unknown, 1 is unit, 0 not a unit.
-
-
Constructor Details
-
Local
-
Local
The constructor creates a Local object from a ring factory and a numerator polynomial. The denominator is assumed to be 1.- Parameters:
r- ring factory.n- numerator polynomial.
-
Local
The constructor creates a Local object from a ring factory and a numerator and denominator polynomial.- Parameters:
r- ring factory.n- numerator polynomial.d- denominator polynomial.
-
Local
The constructor creates a Local object from a ring factory and a numerator and denominator polynomial.- Parameters:
r- ring factory.n- numerator polynomial.d- denominator polynomial.isred- true if gcd(n,d) == 1, else false.
-
-
Method Details
-
factory
-
numerator
Numerator.- Specified by:
numeratorin interfaceQuotPair<C extends GcdRingElem<C>>- See Also:
-
denominator
Denominator.- Specified by:
denominatorin interfaceQuotPair<C extends GcdRingElem<C>>- See Also:
-
copy
-
isZERO
public boolean isZERO()Is Local zero.- Specified by:
isZEROin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- If this is 0 then true is returned, else false.
- See Also:
-
isONE
public boolean isONE()Is Local one.- Specified by:
isONEin interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- If this is 1 then true is returned, else false.
- See Also:
-
isUnit
public boolean isUnit()Is Local unit.- Specified by:
isUnitin interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- If this is a unit then true is returned, else false.
- See Also:
-
isConstant
public boolean isConstant()Is Qoutient a constant.- Specified by:
isConstantin interfaceQuotPair<C extends GcdRingElem<C>>- Returns:
- true, if this has constant numerator and denominator, else false.
-
toString
-
toScript
-
toScriptFactory
Get a scripting compatible string representation of the factory.- Specified by:
toScriptFactoryin interfaceElement<C extends GcdRingElem<C>>- Returns:
- script compatible representation for this ElemFactory.
- See Also:
-
compareTo
Local comparison.- Specified by:
compareToin interfaceComparable<C extends GcdRingElem<C>>- Specified by:
compareToin interfaceElement<C extends GcdRingElem<C>>- Parameters:
b- Local.- Returns:
- sign(this-b).
-
equals
-
hashCode
-
abs
Local absolute value.- Specified by:
absin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- the absolute value of this.
- See Also:
-
sum
Local summation.- Specified by:
sumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- Local.- Returns:
- this+S.
-
negate
Local negate.- Specified by:
negatein interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- -this.
- See Also:
-
signum
public int signum()Local signum.- Specified by:
signumin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Returns:
- signum(this).
- See Also:
-
subtract
Local subtraction.- Specified by:
subtractin interfaceAbelianGroupElem<C extends GcdRingElem<C>>- Parameters:
S- Local.- Returns:
- this-S.
-
divide
Local division.- Specified by:
dividein interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- Local.- Returns:
- this/S.
-
inverse
Local inverse.- Specified by:
inversein interfaceMonoidElem<C extends GcdRingElem<C>>- Returns:
- S with S = 1/this if defined.
- See Also:
-
remainder
Local remainder.- Specified by:
remainderin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- Local.- Returns:
- this - (this/S)*S.
-
multiply
Local multiplication.- Specified by:
multiplyin interfaceMonoidElem<C extends GcdRingElem<C>>- Parameters:
S- Local.- Returns:
- this*S.
-
multiply
Local multiplication by GenPolynomial.- Parameters:
b- GenPolynomial.- Returns:
- this*b.
-
multiply
-
multiply
-
monic
-
gcd
-
egcd
-