org.rubato.math.yoneda
Class Morphism

java.lang.Object
  extended by org.rubato.math.yoneda.Morphism
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<Morphism>, Yoneda, XMLInputOutput<Morphism>
Direct Known Subclasses:
CompoundMorphism, IdentityMorphism

public abstract class Morphism
extends java.lang.Object
implements Yoneda, XMLInputOutput<Morphism>, java.lang.Comparable<Morphism>

Abstract base class for morphisms.

Author:
Gérard Milmeister, Stefan Müller, Stefan Göller
See Also:
Serialized Form

Field Summary
 
Fields inherited from interface org.rubato.math.yoneda.Yoneda
COLIMIT, LIMIT, LIST, POWER, SIMPLE
 
Constructor Summary
Morphism()
           
 
Method Summary
abstract  Morphism at(ModuleElement element)
          Evaluates this morphism at address element.
abstract  Morphism changeAddress(Module address)
          Makes an address change.
abstract  Morphism changeAddress(ModuleMorphism morphism)
          Makes an address change using a module morphism.
 java.lang.Object clone()
          Returns a deep copy of this morphism.
 int compareTo(Morphism object)
           
abstract  Morphism copy()
          Returns a deep copy of this morphism.
abstract  boolean equals(java.lang.Object object)
          Returns true iff this morphism is equal to the specified object.
abstract  boolean fullEquals(Morphism m, java.util.IdentityHashMap<java.lang.Object,java.lang.Object> s)
           
abstract  IdentityMorphism getCodomain()
          Returns the codomain identity morphism (object) of this morphism.
abstract  Diagram getCodomainDiagram()
          Returns the codomain diagram of this morphism.
abstract  Module getCodomainModule()
          Returns the codomain module of this morphism.
abstract  int getCodomainType()
          Returns the codomain denotator type of this morphism.
abstract  java.util.LinkedList<Denotator> getDenotatorDependencies(java.util.LinkedList<Denotator> list)
          Adds the denotator dependencies of this morphism to list.
abstract  IdentityMorphism getDomain()
          Returns the domain identity morphism (object) of this morphism.
abstract  Diagram getDomainDiagram()
          Returns the domain diagram of this morphism.
abstract  Module getDomainModule()
          Returns the domain module of this morphism.
abstract  int getDomainType()
          Returns the domain denotator type of this morphism.
abstract  java.util.LinkedList<Form> getFormDependencies(java.util.LinkedList<Form> list)
          Adds the form dependencies of this morphism to list.
abstract  MorphismMap getMap()
          Returns the implementation of this morphism.
abstract  int hashCode()
          Returns a hash code for this morphism.
 boolean isIdentity()
          Returns true iff this morphism is an identity morphism.
 boolean isRepresentable()
          Returns true iff this morphism is representable.
abstract  void setMap(MorphismMap map)
          Sets the implementation of this morphism.
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.rubato.xml.XMLInputOutput
fromXML, getElementTypeName, toXML
 

Constructor Detail

Morphism

public Morphism()
Method Detail

getDomainDiagram

public abstract Diagram getDomainDiagram()
Returns the domain diagram of this morphism.


getCodomainDiagram

public abstract Diagram getCodomainDiagram()
Returns the codomain diagram of this morphism.


getDomainModule

public abstract Module getDomainModule()
Returns the domain module of this morphism.


getCodomainModule

public abstract Module getCodomainModule()
Returns the codomain module of this morphism.


getDomainType

public abstract int getDomainType()
Returns the domain denotator type of this morphism.


getCodomainType

public abstract int getCodomainType()
Returns the codomain denotator type of this morphism.


getDomain

public abstract IdentityMorphism getDomain()
Returns the domain identity morphism (object) of this morphism.


getCodomain

public abstract IdentityMorphism getCodomain()
Returns the codomain identity morphism (object) of this morphism.


getMap

public abstract MorphismMap getMap()
Returns the implementation of this morphism.


setMap

public abstract void setMap(MorphismMap map)
Sets the implementation of this morphism.


changeAddress

public abstract Morphism changeAddress(Module address)
Makes an address change.

Parameters:
address - the new address of the denotator
Returns:
a copy of this morphism with address newAddress or null if address changed fails

changeAddress

public abstract Morphism changeAddress(ModuleMorphism morphism)
Makes an address change using a module morphism.

Parameters:
morphism - the address changing morphism
Returns:
a copy of this morphism with the new address or null if address change fails

clone

public final java.lang.Object clone()
Returns a deep copy of this morphism.

Specified by:
clone in interface Yoneda
Overrides:
clone in class java.lang.Object

copy

public abstract Morphism copy()
Returns a deep copy of this morphism.


at

public abstract Morphism at(ModuleElement element)
                     throws MappingException
Evaluates this morphism at address element.

Throws:
MappingException - if evaluation fails

isIdentity

public boolean isIdentity()
Returns true iff this morphism is an identity morphism.


isRepresentable

public boolean isRepresentable()
Returns true iff this morphism is representable.


getFormDependencies

public abstract java.util.LinkedList<Form> getFormDependencies(java.util.LinkedList<Form> list)
Adds the form dependencies of this morphism to list.


getDenotatorDependencies

public abstract java.util.LinkedList<Denotator> getDenotatorDependencies(java.util.LinkedList<Denotator> list)
Adds the denotator dependencies of this morphism to list.


compareTo

public int compareTo(Morphism object)
Specified by:
compareTo in interface java.lang.Comparable<Morphism>

equals

public abstract boolean equals(java.lang.Object object)
Returns true iff this morphism is equal to the specified object.

Overrides:
equals in class java.lang.Object

fullEquals

public abstract boolean fullEquals(Morphism m,
                                   java.util.IdentityHashMap<java.lang.Object,java.lang.Object> s)

hashCode

public abstract int hashCode()
Returns a hash code for this morphism.

Overrides:
hashCode in class java.lang.Object