edu.jas.poly
Class Local<C extends RingElem<C>>
- java.lang.Object
-
- edu.jas.poly.Local<C>
-
- All Implemented Interfaces:
- AbelianGroupElem<Local<C>>, Element<Local<C>>, MonoidElem<Local<C>>, QuotPair<C>, RingElem<Local<C>>, java.io.Serializable, java.lang.Comparable<Local<C>>
public class Local<C extends RingElem<C>> extends java.lang.Object implements RingElem<Local<C>>, QuotPair<C>
Local element based on RingElem pairs. Objects of this class are (nearly) immutable.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor and Description Local(LocalRing<C> r)The constructor creates a Local object from a ring factory.Local(LocalRing<C> r, C n)The constructor creates a Local object from a ring factory and a numerator element.Local(LocalRing<C> r, C n, C d)The constructor creates a Local object from a ring factory and a numerator and denominator element.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method and Description Local<C>abs()Local absolute value.intcompareTo(Local<C> b)Local comparison.Local<C>copy()Clone this.Cdenominator()Denominator.Local<C>divide(Local<C> S)Local division.Local<C>[]egcd(Local<C> b)Extended greatest common divisor.booleanequals(java.lang.Object b)Comparison with any other object.LocalRing<C>factory()Get the corresponding element factory.Local<C>gcd(Local<C> b)Greatest common divisor.inthashCode()Hash code for this local.Local<C>inverse()Local inverse.booleanisConstant()Is Local a constant.booleanisONE()Is Local one.booleanisUnit()Is Local unit.booleanisZERO()Is Local zero.Local<C>multiply(Local<C> S)Local multiplication.Local<C>negate()Local negate.Cnumerator()Numerator.Local<C>[]quotientRemainder(Local<C> S)Quotient and remainder by division of this by S.Local<C>remainder(Local<C> S)Local remainder.intsignum()Local signum.Local<C>subtract(Local<C> S)Local subtraction.Local<C>sum(Local<C> S)Local summation.java.lang.StringtoScript()Get a scripting compatible string representation.java.lang.StringtoScriptFactory()Get a scripting compatible string representation of the factory.java.lang.StringtoString()Get the String representation as RingElem.
-
-
-
Constructor Detail
-
Local
public Local(LocalRing<C> r)
The constructor creates a Local object from a ring factory.- Parameters:
r- ring factory.
-
Local
public Local(LocalRing<C> r, C n)
The constructor creates a Local object from a ring factory and a numerator element. The denominator is assumed to be 1.- Parameters:
r- ring factory.n- numerator.
-
-
Method Detail
-
numerator
public C numerator()
Numerator.
-
denominator
public C denominator()
Denominator.- Specified by:
denominatorin interfaceQuotPair<C extends RingElem<C>>- See Also:
QuotPair.denominator()
-
isConstant
public boolean isConstant()
Is Local a constant. Not implemented.- Specified by:
isConstantin interfaceQuotPair<C extends RingElem<C>>- Throws:
UnsupportedOperationException.
-
isZERO
public boolean isZERO()
Is Local zero.- Specified by:
isZEROin interfaceAbelianGroupElem<Local<C extends RingElem<C>>>- Returns:
- If this is 0 then true is returned, else false.
- See Also:
AbelianGroupElem.isZERO()
-
isONE
public boolean isONE()
Is Local one.- Specified by:
isONEin interfaceMonoidElem<Local<C extends RingElem<C>>>- Returns:
- If this is 1 then true is returned, else false.
- See Also:
MonoidElem.isONE()
-
isUnit
public boolean isUnit()
Is Local unit.- Specified by:
isUnitin interfaceMonoidElem<Local<C extends RingElem<C>>>- Returns:
- If this is a unit then true is returned, else false.
- See Also:
MonoidElem.isUnit()
-
toString
public java.lang.String toString()
Get the String representation as RingElem.- Overrides:
toStringin classjava.lang.Object- See Also:
Object.toString()
-
toScript
public java.lang.String toScript()
Get a scripting compatible string representation.
-
toScriptFactory
public java.lang.String toScriptFactory()
Get a scripting compatible string representation of the factory.- Specified by:
toScriptFactoryin interfaceElement<Local<C extends RingElem<C>>>- Returns:
- script compatible representation for this ElemFactory.
- See Also:
Element.toScriptFactory()
-
equals
public boolean equals(java.lang.Object b)
Comparison with any other object.
-
hashCode
public int hashCode()
Hash code for this local.
-
abs
public Local<C> abs()
Local absolute value.- Specified by:
absin interfaceAbelianGroupElem<Local<C extends RingElem<C>>>- Returns:
- the absolute value of this.
- See Also:
AbelianGroupElem.abs()
-
negate
public Local<C> negate()
Local negate.- Specified by:
negatein interfaceAbelianGroupElem<Local<C extends RingElem<C>>>- Returns:
- -this.
- See Also:
AbelianGroupElem.negate()
-
signum
public int signum()
Local signum.- Specified by:
signumin interfaceAbelianGroupElem<Local<C extends RingElem<C>>>- Returns:
- signum(this).
- See Also:
AbelianGroupElem.signum()
-
inverse
public Local<C> inverse()
Local inverse.- Specified by:
inversein interfaceMonoidElem<Local<C extends RingElem<C>>>- Returns:
- S with S = 1/this if defined.
- See Also:
MonoidElem.inverse()
-
quotientRemainder
public Local<C>[] quotientRemainder(Local<C> S)
Quotient and remainder by division of this by S.- Parameters:
S- a Local- Returns:
- [this/S, this - (this/S)*S].
-
gcd
public Local<C> gcd(Local<C> b)
Greatest common divisor. Note: Not implemented, throws UnsupportedOperationException.
-
-
DMelt 3.0 © DataMelt by jWork.ORG