org.rubato.math.module
Class StringElement

java.lang.Object
  extended by org.rubato.math.module.RingElement
      extended by org.rubato.math.module.StringElement
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ModuleElement>, java.lang.Iterable<RingElement>, FreeElement, ModuleElement, XMLInputOutput<ModuleElement>
Direct Known Subclasses:
QStringElement, RStringElement, ZnStringElement, ZStringElement

public abstract class StringElement
extends RingElement

Elements in a string ring.

Author:
Gérard Milmeister
See Also:
StringRing, Serialized Form

Constructor Summary
StringElement()
           
 
Method Summary
 double[] fold(ModuleElement[] elements)
          Folds the RingString elements in elements.
abstract  RingString getRingString()
          Returns the underlying RingString.
 java.lang.String getString()
          Convenience method for getting the string in a StringElement.
abstract  java.util.HashMap<java.lang.String,RingElement> getTerms()
          Returns the terms of the string as a map from strings to factors.
 int hashCode()
          Returns the hash code for this module element.
 boolean isInvertible()
          Returns true if this ring element is invertible.
 
Methods inherited from class org.rubato.math.module.RingElement
clone, compareTo, difference, divide, divides, getComponent, getLength, getRing, getRingElement, inverse, invert, isOne, iterator, multiply, multiplyCW, power, product, productCW, quotient, stringRep, sum
 
Methods inherited from class java.lang.Object
equals, getClass, 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, getModule, isZero, negate, negated, scale, scaled, subtract, sum, toString
 
Methods inherited from interface org.rubato.xml.XMLInputOutput
fromXML, getElementTypeName, toXML
 

Constructor Detail

StringElement

public StringElement()
Method Detail

getString

public java.lang.String getString()
Convenience method for getting the string in a StringElement. Only useful if the RingString has only one term.


getRingString

public abstract RingString getRingString()
Returns the underlying RingString.


isInvertible

public boolean isInvertible()
Description copied from class: RingElement
Returns true if this ring element is invertible.

Specified by:
isInvertible in class RingElement

getTerms

public abstract java.util.HashMap<java.lang.String,RingElement> getTerms()
Returns the terms of the string as a map from strings to factors.


fold

public double[] fold(ModuleElement[] elements)
Folds the RingString elements in elements.


hashCode

public int hashCode()
Description copied from interface: ModuleElement
Returns the hash code for this module element.

Specified by:
hashCode in interface ModuleElement
Overrides:
hashCode in class java.lang.Object