Class Product<C extends RingElem<C>>
java.lang.Object
edu.jas.arith.Product<C>
- All Implemented Interfaces:
AbelianGroupElem<Product<C>>, Element<Product<C>>, GcdRingElem<Product<C>>, MonoidElem<Product<C>>, RegularRingElem<Product<C>>, RingElem<Product<C>>, Serializable, Comparable<Product<C>>
Direct product element based on RingElem. Objects of this class are (nearly)
immutable.
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected intFlag to remember if this product element is a unit in each cmponent.private static final org.apache.logging.log4j.Loggerfinal ProductRing<C> Product class factory data structure.Value part of the element data structure. -
Constructor Summary
ConstructorsConstructorDescriptionProduct(ProductRing<C> r) The constructor creates a Product object from a ring factory.The constructor creates a Product object from a ring factory and a ring element.The constructor creates a Product object from a ring factory, a ring element and an indicator if a is a unit. -
Method Summary
Modifier and TypeMethodDescriptionabs()Product absolute value.intProduct comparison.copy()Clone this.Product quasi-division.Extended greatest common divisor.booleanComparison with any other object.extend(int i, int j) Product extend.factory()Get the corresponding element factory.fillIdempotent(Product<C> S) Product fill with idempotent.fillOne()Product fill with one.Greatest common divisor.get(int i) Get component.inthashCode()Hash code for this local.Product idempotent complement.Product idempotent.idempotentAnd(Product<C> S) Product idempotent and.idempotentOr(Product<C> S) Product idempotent or.inverse()Product quasi-inverse.booleanisFull()Is Product full.booleanIs Product idempotent.booleanisONE()Is Product one.booleanisUnit()Is Product unit.booleanisZERO()Is Product zero.Product multiply by coefficient.Product multiplication.negate()Product negate.Quotient and remainder by division of this by S.Product quasi-remainder.intsignum()Product signum.Product subtraction.Product 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, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
-
Field Details
-
logger
private static final org.apache.logging.log4j.Logger logger -
ring
Product class factory data structure. -
val
-
isunit
protected int isunitFlag to remember if this product element is a unit in each cmponent. -1 is unknown, 1 is unit, 0 not a unit.
-
-
Constructor Details
-
Product
The constructor creates a Product object from a ring factory.- Parameters:
r- ring factory.
-
Product
The constructor creates a Product object from a ring factory and a ring element.- Parameters:
r- ring factory.a- ring element.
-
Product
The constructor creates a Product object from a ring factory, a ring element and an indicator if a is a unit.- Parameters:
r- ring factory.a- ring element.u- isunit indicator, -1, 0, 1.
-
-
Method Details
-
get
-
factory
-
copy
-
isZERO
public boolean isZERO()Is Product zero.- Specified by:
isZEROin interfaceAbelianGroupElem<C extends RingElem<C>>- Returns:
- If this is 0 then true is returned, else false.
- See Also:
-
isONE
public boolean isONE()Is Product one.- Specified by:
isONEin interfaceMonoidElem<C extends RingElem<C>>- Returns:
- If this is 1 then true is returned, else false.
- See Also:
-
isFull
public boolean isFull()Is Product full.- Specified by:
isFullin interfaceRegularRingElem<C extends RingElem<C>>- Returns:
- If every component is non-zero, then true is returned, else false.
-
isUnit
public boolean isUnit()Is Product unit.- Specified by:
isUnitin interfaceMonoidElem<C extends RingElem<C>>- Returns:
- If this is a unit then true is returned, else false.
- See Also:
-
isIdempotent
public boolean isIdempotent()Is Product idempotent.- Specified by:
isIdempotentin interfaceRegularRingElem<C extends RingElem<C>>- Returns:
- If this is a idempotent element then true is returned, else false.
-
toString
-
toScript
-
toScriptFactory
-
compareTo
-
equals
-
hashCode
-
extend
-
abs
-
sum
-
negate
-
signum
public int signum()Product signum.- Specified by:
signumin interfaceAbelianGroupElem<C extends RingElem<C>>- Returns:
- signum of first non-zero component.
- See Also:
-
subtract
-
inverse
-
idempotent
Product idempotent.- Specified by:
idempotentin interfaceRegularRingElem<C extends RingElem<C>>- Returns:
- smallest S with this*S = this.
-
idemComplement
Product idempotent complement.- Specified by:
idemComplementin interfaceRegularRingElem<C extends RingElem<C>>- Returns:
- 1-this.idempotent().
-
idempotentAnd
Product idempotent and.- Specified by:
idempotentAndin interfaceRegularRingElem<C extends RingElem<C>>- Parameters:
S- Product.- Returns:
- this.idempotent() and S.idempotent().
-
idempotentOr
Product idempotent or.- Specified by:
idempotentOrin interfaceRegularRingElem<C extends RingElem<C>>- Parameters:
S- Product.- Returns:
- this.idempotent() or S.idempotent().
-
fillIdempotent
Product fill with idempotent.- Specified by:
fillIdempotentin interfaceRegularRingElem<C extends RingElem<C>>- Parameters:
S- Product.- Returns:
- fill this with S.idempotent().
-
fillOne
-
divide
-
remainder
-
quotientRemainder
Quotient and remainder by division of this by S.- Specified by:
quotientRemainderin interfaceMonoidElem<C extends RingElem<C>>- Parameters:
S- a product- Returns:
- [this/S, this - (this/S)*S].
-
multiply
-
multiply
-
gcd
-
egcd
-