org.rubato.math.module.morphism
Class CanonicalMorphism

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

public abstract class CanonicalMorphism
extends ModuleMorphism

Canonical morphisms are the "simplest" morphisms that map an element from the domain to the codomain, e.g, identities, embeddings or casts. The make(org.rubato.math.module.Module, org.rubato.math.module.Module) method is used to create a canonical morphism.

Author:
Gérard Milmeister
See Also:
Serialized Form

Method Summary
 boolean equals(java.lang.Object object)
          Returns true iff this morphism is equal to object.
 ModuleMorphism fromXML(XMLReader reader, org.w3c.dom.Element element)
          Reads XML representation from reader starting with element.
 java.lang.String getElementTypeName()
          Returns the value of the type attribute for this class.
static XMLInputOutput<ModuleMorphism> getXMLInputOutput()
           
 boolean isModuleHomomorphism()
          If true, then this is a module homomorphism.
 boolean isRingHomomorphism()
          If true, then this is a ring homomorphism.
static ModuleMorphism make(Module domain, Module codomain)
          Creates a canonical morphism from domain to codomain.
 java.lang.String toString()
          Returns a string representation of this morphism.
 void toXML(XMLWriter writer)
          Outputs XML representation to writer.
 
Methods inherited from class org.rubato.math.module.morphism.ModuleMorphism
atZero, clone, compareTo, composable, compose, difference, getCodomain, getConstantMorphism, getConstantMorphism, getDomain, getIdentityMorphism, getRingMorphism, inDomain, isConstant, isIdentity, isLinear, isRingMorphism, map, power, scaled, sum
 
Methods inherited from class java.lang.Object
getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

make

public static ModuleMorphism make(Module domain,
                                  Module codomain)
Creates a canonical morphism from domain to codomain.

Returns:
null iff no such morphism could be created

isModuleHomomorphism

public boolean isModuleHomomorphism()
Description copied from class: ModuleMorphism
If true, then this is a module homomorphism.

Overrides:
isModuleHomomorphism in class ModuleMorphism

isRingHomomorphism

public boolean isRingHomomorphism()
Description copied from class: ModuleMorphism
If true, then this is a ring homomorphism.

Overrides:
isRingHomomorphism in class ModuleMorphism

equals

public boolean equals(java.lang.Object object)
Description copied from class: ModuleMorphism
Returns true iff this morphism is equal to object. In general it is not possible to determine whether to functions are the same, so this returns true iff both morphisms have the same structure.

Specified by:
equals in class ModuleMorphism

toString

public java.lang.String toString()
Description copied from class: ModuleMorphism
Returns a string representation of this morphism. This string is used for generic comparison.

Specified by:
toString in class ModuleMorphism

toXML

public void toXML(XMLWriter writer)
Description copied from interface: XMLInputOutput
Outputs XML representation to writer.


fromXML

public ModuleMorphism fromXML(XMLReader reader,
                              org.w3c.dom.Element element)
Description copied from interface: XMLInputOutput
Reads XML representation from reader starting with element.

Returns:
an object of type T or null if parsing failed

getXMLInputOutput

public static XMLInputOutput<ModuleMorphism> getXMLInputOutput()

getElementTypeName

public java.lang.String getElementTypeName()
Description copied from interface: XMLInputOutput
Returns the value of the type attribute for this class.