public class Local<C extends RingElem<C>> extends java.lang.Object implements RingElem<Local<C>>, QuotPair<C>
Modifier and Type | Field and Description |
---|---|
protected C |
den
Denominator part of the element data structure.
|
protected int |
isunit
Flag to remember if this local element is a unit. -1 is unknown, 1 is
unit, 0 not a unit.
|
protected C |
num
Numerator part of the element data structure.
|
protected LocalRing<C> |
ring
Local class factory data structure.
|
Modifier | 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.
|
protected |
Local(LocalRing<C> r,
C n,
C d,
boolean isred)
The constructor creates a Local object from a ring factory and a
numerator and denominator element.
|
Modifier and Type | Method and Description |
---|---|
Local<C> |
abs()
Local absolute value.
|
int |
compareTo(Local<C> b)
Local comparison.
|
Local<C> |
copy()
Clone this.
|
C |
denominator()
Denominator.
|
Local<C> |
divide(Local<C> S)
Local division.
|
Local<C>[] |
egcd(Local<C> b)
Extended greatest common divisor.
|
boolean |
equals(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.
|
int |
hashCode()
Hash code for this local.
|
Local<C> |
inverse()
Local inverse.
|
boolean |
isConstant()
Is Local a constant.
|
boolean |
isONE()
Is Local one.
|
boolean |
isUnit()
Is Local unit.
|
boolean |
isZERO()
Is Local zero.
|
Local<C> |
multiply(Local<C> S)
Local multiplication.
|
Local<C> |
negate()
Local negate.
|
C |
numerator()
Numerator.
|
Local<C>[] |
quotientRemainder(Local<C> S)
Quotient and remainder by division of this by S.
|
Local<C> |
remainder(Local<C> S)
Local remainder.
|
int |
signum()
Local signum.
|
Local<C> |
subtract(Local<C> S)
Local subtraction.
|
Local<C> |
sum(Local<C> S)
Local summation.
|
java.lang.String |
toScript()
Get a scripting compatible string representation.
|
java.lang.String |
toScriptFactory()
Get a scripting compatible string representation of the factory.
|
java.lang.String |
toString()
Get the String representation as RingElem.
|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
leftDivide, leftRemainder, power, rightDivide, rightRemainder, twosidedDivide, twosidedRemainder
protected int isunit
public Local(LocalRing<C> r)
r
- ring factory.public Local(LocalRing<C> r, C n)
r
- ring factory.n
- numerator.public Local(LocalRing<C> r, C n, C d)
r
- ring factory.n
- numerator.d
- denominator.public C denominator()
denominator
in interface QuotPair<C extends RingElem<C>>
QuotPair.denominator()
public boolean isConstant()
isConstant
in interface QuotPair<C extends RingElem<C>>
UnsupportedOperationException.
public boolean isZERO()
isZERO
in interface AbelianGroupElem<Local<C extends RingElem<C>>>
AbelianGroupElem.isZERO()
public boolean isONE()
isONE
in interface MonoidElem<Local<C extends RingElem<C>>>
MonoidElem.isONE()
public boolean isUnit()
isUnit
in interface MonoidElem<Local<C extends RingElem<C>>>
MonoidElem.isUnit()
public java.lang.String toString()
toString
in class java.lang.Object
Object.toString()
public java.lang.String toScript()
public java.lang.String toScriptFactory()
toScriptFactory
in interface Element<Local<C extends RingElem<C>>>
Element.toScriptFactory()
public boolean equals(java.lang.Object b)
public int hashCode()
public Local<C> abs()
abs
in interface AbelianGroupElem<Local<C extends RingElem<C>>>
AbelianGroupElem.abs()
public Local<C> negate()
negate
in interface AbelianGroupElem<Local<C extends RingElem<C>>>
AbelianGroupElem.negate()
public int signum()
signum
in interface AbelianGroupElem<Local<C extends RingElem<C>>>
AbelianGroupElem.signum()
public Local<C> inverse()
inverse
in interface MonoidElem<Local<C extends RingElem<C>>>
MonoidElem.inverse()
public Local<C>[] quotientRemainder(Local<C> S)
quotientRemainder
in interface MonoidElem<Local<C extends RingElem<C>>>
S
- a Localpublic Local<C> gcd(Local<C> b)