|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.rubato.math.module.RingElement
public abstract class RingElement
The abstract base class for ring elements. Ring elements always have length 1.
Ring
,
Serialized FormConstructor Summary | |
---|---|
RingElement()
|
Method Summary | |
---|---|
abstract RingElement |
clone()
Returns a deep copy of this module element. |
int |
compareTo(ModuleElement object)
Compares this module element with object . |
RingElement |
difference(RingElement element)
|
abstract void |
divide(RingElement element)
Replaces this by the solution x of
element *x = this , if it exists,
otherwise a DivisionException is thrown. |
abstract boolean |
divides(RingElement element)
Return true iff the solution x of this *x = element
exists. |
ModuleElement |
getComponent(int i)
Returns the i -th component of this free element. |
int |
getLength()
Returns the length of this ring element. |
Ring |
getRing()
Returns the ring this element is a member of. |
RingElement |
getRingElement(int i)
Returns the i -th ring component of this free element. |
abstract RingElement |
inverse()
Returns the inverse of this ring element, if it has an inverse. |
abstract void |
invert()
Inverts this ring element, if it has an inverse. |
abstract boolean |
isInvertible()
Returns true if this ring element is invertible. |
abstract boolean |
isOne()
Returns true if this ring element is one. |
java.util.Iterator<RingElement> |
iterator()
Returns an iterator to the factors of the element. |
abstract void |
multiply(RingElement element)
Multiplies this ring element with element . |
void |
multiplyCW(ModuleElement element)
Multiply this module element componentwise with element . |
RingElement |
power(int n)
Raises this ring element to the power n . |
abstract RingElement |
product(RingElement element)
Returns the product of this ring element with element . |
ModuleElement |
productCW(ModuleElement element)
Returns the componentwise product of this module element and element . |
abstract RingElement |
quotient(RingElement element)
Returns the solution x of element *x = this ,
if it exists, otherwise a DivisionException is thrown. |
abstract java.lang.String |
stringRep(boolean... parens)
Returns a string representation of this module element. |
RingElement |
sum(RingElement element)
|
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.rubato.math.module.FreeElement |
---|
resize |
Methods inherited from interface org.rubato.math.module.ModuleElement |
---|
add, cast, difference, equals, fold, getModule, hashCode, isZero, negate, negated, scale, scaled, subtract, sum, toString |
Methods inherited from interface org.rubato.xml.XMLInputOutput |
---|
fromXML, getElementTypeName, toXML |
Constructor Detail |
---|
public RingElement()
Method Detail |
---|
public abstract boolean isOne()
public RingElement sum(RingElement element) throws DomainException
DomainException
public RingElement difference(RingElement element) throws DomainException
DomainException
public abstract RingElement product(RingElement element) throws DomainException
element
.
DomainException
- if element
is not in domainpublic abstract void multiply(RingElement element) throws DomainException
element
.
DomainException
- if element
is not in domainpublic ModuleElement productCW(ModuleElement element) throws DomainException
FreeElement
element
.
productCW
in interface FreeElement
DomainException
- if element
is not in domainpublic void multiplyCW(ModuleElement element) throws DomainException
FreeElement
element
.
This is a destructive operation.
multiplyCW
in interface FreeElement
DomainException
- if element
is not in domainpublic abstract boolean isInvertible()
public abstract RingElement inverse()
public abstract void invert()
public abstract RingElement quotient(RingElement element) throws DomainException, DivisionException
element
*x = this
,
if it exists, otherwise a DivisionException is thrown.
DomainException
DivisionException
public abstract void divide(RingElement element) throws DomainException, DivisionException
this
by the solution x of
element
*x = this
, if it exists,
otherwise a DivisionException is thrown.
DomainException
DivisionException
public abstract boolean divides(RingElement element)
this
*x = element
exists.
public RingElement power(int n)
n
.
public int getLength()
getLength
in interface FreeElement
getLength
in interface ModuleElement
public ModuleElement getComponent(int i)
FreeElement
i
-th component of this free element.
getComponent
in interface FreeElement
getComponent
in interface ModuleElement
public RingElement getRingElement(int i)
FreeElement
i
-th ring component of this free element.
getRingElement
in interface FreeElement
public java.util.Iterator<RingElement> iterator()
FreeElement
iterator
in interface java.lang.Iterable<RingElement>
iterator
in interface FreeElement
public Ring getRing()
public int compareTo(ModuleElement object)
ModuleElement
object
.
compareTo
in interface java.lang.Comparable<ModuleElement>
compareTo
in interface ModuleElement
public abstract java.lang.String stringRep(boolean... parens)
ModuleElement
stringRep
in interface ModuleElement
public abstract RingElement clone()
ModuleElement
clone
in interface ModuleElement
clone
in class java.lang.Object
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |