org.rubato.math.module
Interface FreeElement

All Superinterfaces:
java.lang.Cloneable, java.lang.Comparable<ModuleElement>, java.lang.Iterable<RingElement>, ModuleElement, java.io.Serializable, XMLInputOutput<ModuleElement>
All Known Subinterfaces:
CFreeElement, ModularPolynomialFreeElement, PolynomialFreeElement, ProductFreeElement, QFreeElement, QStringFreeElement, RFreeElement, RStringFreeElement, ZFreeElement, ZnFreeElement, ZnStringFreeElement, ZStringFreeElement
All Known Implementing Classes:
CElement, CProperFreeElement, ModularPolynomialElement, ModularPolynomialProperFreeElement, PolynomialElement, PolynomialProperFreeElement, ProductElement, ProductProperFreeElement, ProperFreeElement, QElement, QProperFreeElement, QStringElement, QStringProperFreeElement, RElement, RingElement, RProperFreeElement, RStringElement, RStringProperFreeElement, StringElement, ZElement, ZnElement, ZnProperFreeElement, ZnStringElement, ZnStringProperFreeElement, ZProperFreeElement, ZStringElement, ZStringProperFreeElement

public interface FreeElement
extends ModuleElement, java.lang.Iterable<RingElement>

The interface for elements in a free module.

Author:
Gérard Milmeister
See Also:
FreeModule

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

Method Detail

getComponent

ModuleElement getComponent(int i)
Returns the i-th component of this free element.

Specified by:
getComponent in interface ModuleElement

getRingElement

RingElement getRingElement(int i)
Returns the i-th ring component of this free element.


getLength

int getLength()
Returns the length of this free element.

Specified by:
getLength in interface ModuleElement

productCW

ModuleElement productCW(ModuleElement element)
                        throws DomainException
Returns the componentwise product of this module element and element.

Throws:
DomainException - if element is not in domain

multiplyCW

void multiplyCW(ModuleElement element)
                throws DomainException
Multiply this module element componentwise with element. This is a destructive operation.

Throws:
DomainException - if element is not in domain

iterator

java.util.Iterator<RingElement> iterator()
Returns an iterator to the factors of the element.

Specified by:
iterator in interface java.lang.Iterable<RingElement>

resize

FreeElement resize(int n)
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.