org.rubato.math.module
Interface QFreeElement

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<ModuleElement>, FreeElement, java.lang.Iterable<RingElement>, ModuleElement, java.io.Serializable, XMLInputOutput<ModuleElement>
All Known Implementing Classes:
QElement, QProperFreeElement

public interface QFreeElement
extends FreeElement

The interface for elements in a free module of rationals.

Author:
Gérard Milmeister
See Also:
QFreeModule

Method Summary
 QFreeElement clone()
          Returns a deep copy of this module element.
 QFreeElement difference(ModuleElement element)
          Returns the difference of this module element and element.
 QElement getComponent(int i)
          Returns the i-th component of this free element.
 QElement getRingElement(int i)
          Returns the i-th ring component of this free element.
 QFreeElement negated()
          Returns the negative of this module element.
 QFreeElement resize(int n)
          Returns this free element resized to length n.
 QFreeElement scaled(RingElement element)
          Returns the product of this element with element.
 QFreeElement sum(ModuleElement element)
          Returns the sum of this module element and element.
 
Methods inherited from interface org.rubato.math.module.FreeElement
getLength, iterator, multiplyCW, productCW
 
Methods inherited from interface org.rubato.math.module.ModuleElement
add, cast, compareTo, equals, fold, getModule, hashCode, isZero, negate, scale, stringRep, subtract, toString
 
Methods inherited from interface org.rubato.xml.XMLInputOutput
fromXML, getElementTypeName, toXML
 

Method Detail

sum

QFreeElement sum(ModuleElement element)
                 throws DomainException
Description copied from interface: ModuleElement
Returns the sum of this module element and element.

Specified by:
sum in interface ModuleElement
Throws:
DomainException - if element is not in domain

difference

QFreeElement difference(ModuleElement element)
                        throws DomainException
Description copied from interface: ModuleElement
Returns the difference of this module element and element.

Specified by:
difference in interface ModuleElement
Throws:
DomainException - if element is not in domain

negated

QFreeElement negated()
Description copied from interface: ModuleElement
Returns the negative of this module element.

Specified by:
negated in interface ModuleElement

scaled

QFreeElement scaled(RingElement element)
                    throws DomainException
Description copied from interface: ModuleElement
Returns the product of this element with element.

Specified by:
scaled in interface ModuleElement
Throws:
DomainException - if element is not in domain

resize

QFreeElement resize(int n)
Description copied from interface: FreeElement
Returns this free element resized to length n. If the new length n is greater than the old length, the new values are filled with the zero of the underlying ring. If the new length n is less than the old length, the vector of values is simply truncated.

Specified by:
resize in interface FreeElement

getComponent

QElement getComponent(int i)
Description copied from interface: FreeElement
Returns the i-th component of this free element.

Specified by:
getComponent in interface FreeElement
Specified by:
getComponent in interface ModuleElement

getRingElement

QElement getRingElement(int i)
Description copied from interface: FreeElement
Returns the i-th ring component of this free element.

Specified by:
getRingElement in interface FreeElement

clone

QFreeElement clone()
Description copied from interface: ModuleElement
Returns a deep copy of this module element.

Specified by:
clone in interface ModuleElement