Quotient
edu.jas.poly

## Class Quotient<C extends RingElem<C>>

• ### Field Summary

Fields
Modifier and TypeField and Description
`C``den`
Denominator part of the element data structure.
`C``num`
Numerator part of the element data structure.
`QuotientRing<C>``ring`
Quotient class factory data structure.
• ### Constructor Summary

Constructors
Constructor and Description
`Quotient(QuotientRing<C> r)`
The constructor creates a Quotient object from a ring factory.
`Quotient(QuotientRing<C> r, C n)`
The constructor creates a Quotient object from a ring factory and a numerator element.
`Quotient(QuotientRing<C> r, C n, C d)`
The constructor creates a Quotient object from a ring factory and a numerator and denominator element.
• ### Method Summary

Methods
Modifier and TypeMethod and Description
`Quotient<C>``abs()`
Quotient absolute value.
`int``compareTo(Quotient<C> b)`
Quotient comparison.
`Quotient<C>``copy()`
Clone this.
`C``denominator()`
Denominator.
`Quotient<C>``divide(Quotient<C> S)`
Quotient division.
`Quotient<C>[]``egcd(Quotient<C> b)`
Extended greatest common divisor.
`boolean``equals(Object b)`
Comparison with any other object.
`QuotientRing<C>``factory()`
Get the corresponding element factory.
`Quotient<C>``gcd(Quotient<C> b)`
Greatest common divisor.
`int``hashCode()`
Hash code for this local.
`Quotient<C>``inverse()`
Quotient inverse.
`boolean``isConstant()`
Is Quotient a constant.
`boolean``isONE()`
Is Quotient one.
`boolean``isUnit()`
Is Quotient unit.
`boolean``isZERO()`
Is Quotient zero.
`Quotient<C>``monic()`
Quotient monic.
`Quotient<C>``multiply(Quotient<C> S)`
Quotient multiplication.
`Quotient<C>``negate()`
Quotient negate.
`C``numerator()`
Numerator.
`Quotient<C>[]``quotientRemainder(Quotient<C> S)`
Quotient and remainder by division of this by S.
`Quotient<C>``remainder(Quotient<C> S)`
Quotient remainder.
`int``signum()`
Quotient signum.
`Quotient<C>``subtract(Quotient<C> S)`
Quotient subtraction.
`Quotient<C>``sum(Quotient<C> S)`
Quotient summation.
`String``toScript()`
Get a scripting compatible string representation.
`String``toScriptFactory()`
Get a scripting compatible string representation of the factory.
`String``toString()`
Get the String representation as RingElem.
• ### Methods inherited from class java.lang.Object

`getClass, notify, notifyAll, wait, wait, wait`
• ### Field Detail

• #### ring

`public final QuotientRing<C extends RingElem<C>> ring`
Quotient class factory data structure.
• #### num

`public final C extends RingElem<C> num`
Numerator part of the element data structure.
• #### den

`public final C extends RingElem<C> den`
Denominator part of the element data structure.
• ### Constructor Detail

• #### Quotient

`public Quotient(QuotientRing<C> r)`
The constructor creates a Quotient object from a ring factory.
Parameters:
`r` - ring factory.
• #### Quotient

`public Quotient(QuotientRing<C> r,        C n)`
The constructor creates a Quotient object from a ring factory and a numerator element. The denominator is assumed to be 1.
Parameters:
`r` - ring factory.
`n` - numerator.
• #### Quotient

`public Quotient(QuotientRing<C> r,        C n,        C d)`
The constructor creates a Quotient object from a ring factory and a numerator and denominator element.
Parameters:
`r` - ring factory.
`n` - numerator.
`d` - denominator.
• ### Method Detail

• #### factory

`public QuotientRing<C> factory()`
Get the corresponding element factory.
Specified by:
`factory` in interface `Element<Quotient<C extends RingElem<C>>>`
Returns:
factory for this Element.
`Element.factory()`
• #### numerator

`public C numerator()`
Numerator.
Specified by:
`numerator` in interface `QuotPair<C extends RingElem<C>>`
`QuotPair.numerator()`
• #### denominator

`public C denominator()`
Denominator.
Specified by:
`denominator` in interface `QuotPair<C extends RingElem<C>>`
`QuotPair.denominator()`
• #### isConstant

`public boolean isConstant()`
Is Quotient a constant. Not implemented.
Specified by:
`isConstant` in interface `QuotPair<C extends RingElem<C>>`
Throws:
`UnsupportedOperationException.`
• #### copy

`public Quotient<C> copy()`
Clone this.
Specified by:
`copy` in interface `Element<Quotient<C extends RingElem<C>>>`
Returns:
Creates and returns a copy of this Element.
`Object.clone()`
• #### isZERO

`public boolean isZERO()`
Is Quotient zero.
Specified by:
`isZERO` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Returns:
If this is 0 then true is returned, else false.
`AbelianGroupElem.isZERO()`
• #### isONE

`public boolean isONE()`
Is Quotient one.
Specified by:
`isONE` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Returns:
If this is 1 then true is returned, else false.
`MonoidElem.isONE()`
• #### isUnit

`public boolean isUnit()`
Is Quotient unit.
Specified by:
`isUnit` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Returns:
If this is a unit then true is returned, else false.
`MonoidElem.isUnit()`
• #### toString

`public String toString()`
Get the String representation as RingElem.
Overrides:
`toString` in class `Object`
`Object.toString()`
• #### toScript

`public String toScript()`
Get a scripting compatible string representation.
Specified by:
`toScript` in interface `Element<Quotient<C extends RingElem<C>>>`
Returns:
script compatible representation for this Element.
`Element.toScript()`
• #### toScriptFactory

`public String toScriptFactory()`
Get a scripting compatible string representation of the factory.
Specified by:
`toScriptFactory` in interface `Element<Quotient<C extends RingElem<C>>>`
Returns:
script compatible representation for this ElemFactory.
`Element.toScriptFactory()`
• #### compareTo

`public int compareTo(Quotient<C> b)`
Quotient comparison.
Specified by:
`compareTo` in interface `Element<Quotient<C extends RingElem<C>>>`
Specified by:
`compareTo` in interface `Comparable<Quotient<C extends RingElem<C>>>`
Parameters:
`b` - Quotient.
Returns:
sign(this-b).
• #### equals

`public boolean equals(Object b)`
Comparison with any other object.
Specified by:
`equals` in interface `Element<Quotient<C extends RingElem<C>>>`
Overrides:
`equals` in class `Object`
Returns:
true if this is equal to b, else false.
`Object.equals(java.lang.Object)`
• #### hashCode

`public int hashCode()`
Hash code for this local.
Specified by:
`hashCode` in interface `Element<Quotient<C extends RingElem<C>>>`
Overrides:
`hashCode` in class `Object`
Returns:
the hashCode.
`Object.hashCode()`
• #### abs

`public Quotient<C> abs()`
Quotient absolute value.
Specified by:
`abs` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Returns:
the absolute value of this.
`AbelianGroupElem.abs()`
• #### sum

`public Quotient<C> sum(Quotient<C> S)`
Quotient summation.
Specified by:
`sum` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Parameters:
`S` - Quotient.
Returns:
this+S.
• #### negate

`public Quotient<C> negate()`
Quotient negate.
Specified by:
`negate` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Returns:
-this.
`AbelianGroupElem.negate()`
• #### signum

`public int signum()`
Quotient signum.
Specified by:
`signum` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Returns:
signum(this).
`AbelianGroupElem.signum()`
• #### subtract

`public Quotient<C> subtract(Quotient<C> S)`
Quotient subtraction.
Specified by:
`subtract` in interface `AbelianGroupElem<Quotient<C extends RingElem<C>>>`
Parameters:
`S` - Quotient.
Returns:
this-S.
• #### divide

`public Quotient<C> divide(Quotient<C> S)`
Quotient division.
Specified by:
`divide` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Parameters:
`S` - Quotient.
Returns:
this/S.
• #### inverse

`public Quotient<C> inverse()`
Quotient inverse.
Specified by:
`inverse` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Returns:
S with S = 1/this.
`MonoidElem.inverse()`
• #### remainder

`public Quotient<C> remainder(Quotient<C> S)`
Quotient remainder.
Specified by:
`remainder` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Parameters:
`S` - Quotient.
Returns:
this - (this/S)*S.
• #### quotientRemainder

`public Quotient<C>[] quotientRemainder(Quotient<C> S)`
Quotient and remainder by division of this by S.
Parameters:
`S` - a Quotient
Returns:
[this/S, this - (this/S)*S].
• #### multiply

`public Quotient<C> multiply(Quotient<C> S)`
Quotient multiplication.
Specified by:
`multiply` in interface `MonoidElem<Quotient<C extends RingElem<C>>>`
Parameters:
`S` - Quotient.
Returns:
this*S.
• #### monic

`public Quotient<C> monic()`
Quotient monic.
Returns:
this with monic value part.
• #### gcd

`public Quotient<C> gcd(Quotient<C> b)`
Greatest common divisor. Note: If not defined, throws UnsupportedOperationException.
Specified by:
`gcd` in interface `RingElem<Quotient<C extends RingElem<C>>>`
Parameters:
`b` - other element.
Returns:
gcd(this,b).
• #### egcd

`public Quotient<C>[] egcd(Quotient<C> b)`
Extended greatest common divisor. Note: If not defined, throws UnsupportedOperationException.
Specified by:
`egcd` in interface `RingElem<Quotient<C extends RingElem<C>>>`
Parameters:
`b` - other element.
Returns:
[ gcd(this,b), c1, c2 ] with c1*this + c2*b = gcd(this,b).

SCaVis 2.2 © jWork.ORG