org.rubato.math.module.morphism
Class ZnAbstractMorphism

java.lang.Object
  extended by org.rubato.math.module.morphism.ModuleMorphism
      extended by org.rubato.math.module.morphism.ZnAbstractMorphism
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<ModuleMorphism>, XMLInputOutput<ModuleMorphism>
Direct Known Subclasses:
ZnAffineMorphism

public abstract class ZnAbstractMorphism
extends ModuleMorphism

The abstract base class for morphisms in Zn.

Author:
Gérard Milmeister
See Also:
Serialized Form

Constructor Summary
ZnAbstractMorphism(int modulus)
           
 
Method Summary
 int getModulus()
          Returns the modulus of the (co)domain modular ring.
 ModuleMorphism getRingMorphism()
          Returns the the ring morphism that transforms between the rings of the domain and codomain modules.
 ModuleElement map(ModuleElement x)
          Maps the element x.
abstract  int mapValue(int x)
          The low-level map method.
 
Methods inherited from class org.rubato.math.module.morphism.ModuleMorphism
atZero, clone, compareTo, composable, compose, difference, equals, getCodomain, getConstantMorphism, getConstantMorphism, getDomain, getIdentityMorphism, inDomain, isConstant, isIdentity, isLinear, isModuleHomomorphism, isRingHomomorphism, isRingMorphism, power, scaled, sum, toString
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.rubato.xml.XMLInputOutput
fromXML, getElementTypeName, toXML
 

Constructor Detail

ZnAbstractMorphism

public ZnAbstractMorphism(int modulus)
Method Detail

map

public ModuleElement map(ModuleElement x)
                  throws MappingException
Description copied from class: ModuleMorphism
Maps the element x. This must be implemented for each specific morphism type.

Specified by:
map in class ModuleMorphism
Returns:
the result of mapping element x
Throws:
MappingException - if mapping of element fails

mapValue

public abstract int mapValue(int x)
The low-level map method. This must be implemented in subclasses.


getModulus

public int getModulus()
Returns the modulus of the (co)domain modular ring.


getRingMorphism

public ModuleMorphism getRingMorphism()
Description copied from class: ModuleMorphism
Returns the the ring morphism that transforms between the rings of the domain and codomain modules.

Specified by:
getRingMorphism in class ModuleMorphism