org.rubato.math.module
Interface Module

All Superinterfaces:
java.lang.Comparable<Module>, java.io.Serializable, XMLInputOutput<Module>
All Known Subinterfaces:
CFreeModule, FreeModule, ModularPolynomialFreeModule, PolynomialFreeModule, ProductFreeModule, QFreeModule, QStringFreeModule, RFreeModule, RStringFreeModule, ZFreeModule, ZnFreeModule, ZnStringFreeModule, ZStringFreeModule
All Known Implementing Classes:
CProperFreeModule, CRing, DirectSumModule, ModularPolynomialProperFreeModule, ModularPolynomialRing, NumberRing, PolynomialProperFreeModule, PolynomialRing, ProductProperFreeModule, ProductRing, ProperFreeModule, QProperFreeModule, QRing, QStringProperFreeModule, QStringRing, RestrictedModule, Ring, RProperFreeModule, RRing, RStringProperFreeModule, RStringRing, StringRing, ZnProperFreeModule, ZnRing, ZnStringProperFreeModule, ZnStringRing, ZProperFreeModule, ZRing, ZStringProperFreeModule, ZStringRing

public interface Module
extends java.io.Serializable, java.lang.Comparable<Module>, XMLInputOutput<Module>

The interface for modules.

Author:
Gérard Milmeister
See Also:
ModuleElement

Method Summary
 ModuleElement cast(ModuleElement element)
          Casts element to an element in this module if possible.
 int compareTo(Module object)
          Compares this module with object.
 ModuleElement createElement(java.util.List<ModuleElement> elements)
          Creates an element in this module from a list of module elements.
 boolean equals(java.lang.Object object)
          Returns true iff this module is equals to object.
 Module getComponentModule(int i)
          Returns the i-th component module.
 int getDimension()
          Returns the dimension of this module.
 ModuleMorphism getIdentityMorphism()
          Returns the identity morphism in this module.
 Module getNullModule()
          Returns the null-module corresponding to this module.
 Ring getRing()
          Returns the underlying ring of this module.
 ModuleMorphism getTranslation(ModuleElement element)
          Returns a morphism that translates by element.
 ModuleElement getZero()
          Returns the zero element in this module.
 boolean hasElement(ModuleElement element)
          Returns true iff element is an element of this module.
 int hashCode()
          Returns the hash code for this module.
 boolean isNullModule()
          Returns true iff this is a null-module.
 boolean isRing()
          Returns true iff this module is a ring.
 ModuleElement parseString(java.lang.String string)
          Creates an element in this module from a string representation.
 java.lang.String toString()
          Returns a human readable string representation of this module.
 java.lang.String toVisualString()
          Returns a human readable string representation of this module.
 
Methods inherited from interface org.rubato.xml.XMLInputOutput
fromXML, getElementTypeName, toXML
 

Method Detail

getZero

ModuleElement getZero()
Returns the zero element in this module.


getIdentityMorphism

ModuleMorphism getIdentityMorphism()
Returns the identity morphism in this module.


getDimension

int getDimension()
Returns the dimension of this module.


getNullModule

Module getNullModule()
Returns the null-module corresponding to this module.


isNullModule

boolean isNullModule()
Returns true iff this is a null-module.


isRing

boolean isRing()
Returns true iff this module is a ring.


getRing

Ring getRing()
Returns the underlying ring of this module.


getComponentModule

Module getComponentModule(int i)
Returns the i-th component module.


hasElement

boolean hasElement(ModuleElement element)
Returns true iff element is an element of this module.


getTranslation

ModuleMorphism getTranslation(ModuleElement element)
Returns a morphism that translates by element.


cast

ModuleElement cast(ModuleElement element)
Casts element to an element in this module if possible.

Returns:
null if cast is not possible

createElement

ModuleElement createElement(java.util.List<ModuleElement> elements)
Creates an element in this module from a list of module elements.

Returns:
null if no element in this module can be created from the arguments.

parseString

ModuleElement parseString(java.lang.String string)
Creates an element in this module from a string representation.

Returns:
null if the string is in the wrong format

hashCode

int hashCode()
Returns the hash code for this module.

Overrides:
hashCode in class java.lang.Object

equals

boolean equals(java.lang.Object object)
Returns true iff this module is equals to object.

Overrides:
equals in class java.lang.Object

compareTo

int compareTo(Module object)
Compares this module with object.

Specified by:
compareTo in interface java.lang.Comparable<Module>

toString

java.lang.String toString()
Returns a human readable string representation of this module. The representation is not meant to be parseable.

Overrides:
toString in class java.lang.Object

toVisualString

java.lang.String toVisualString()
Returns a human readable string representation of this module. The representation is not meant to be parseable. The string should be a short representation, possibly using Unicode characters.