shh.homolalg
Interface Morphism

All Known Subinterfaces:
ExactCategoryMorphism
All Known Implementing Classes:
QvspMorphism

public interface Morphism

A morphism in a category.

In addition to the methods below, an implementation may need to override Object.equals(java.lang.Object). For instance, any two identity morphisms for the same object should be equal in the sense of equals, as should any two inverse morphisms for a given isomorphism. As always with Java, a class overriding equals needs to make Object.hashCode() consistent with equals.

Author:
Mark McConnell

Method Summary
 Morphism compose(Morphism f)
          Returns the composition in the following diagram.
 Morphism getInverse()
          Returns the inverse morphism, if it exists.
 Obj getSource()
          The source (domain) of the morphism.
 Obj getTarget()
          The target (codomain or range) of the morphism.
 boolean isEpic()
          Whether this is an epimorphism.
 boolean isIsomorphism()
          Whether this has an inverse morphism.
 boolean isMonic()
          Whether this is a monomorphism.
 

Method Detail

getSource

public Obj getSource()
The source (domain) of the morphism.


getTarget

public Obj getTarget()
The target (codomain or range) of the morphism.


compose

public Morphism compose(Morphism f)
Returns the composition in the following diagram.

       U <------- T <------- S
           this         f

       

The implementation must satisfy the axioms of a category. For instance, composition must be associative.

The implementation may throw an IllegalArgumentException if the source of this and the target of f are not equal in the sense of equals.

The implementation may throw an UnsupportedOperationException if the morphisms are not composable, e.g., if they're from different categories.


isMonic

public boolean isMonic()
Whether this is a monomorphism.


isEpic

public boolean isEpic()
Whether this is an epimorphism.


isIsomorphism

public boolean isIsomorphism()
Whether this has an inverse morphism. Compare getInverse().


getInverse

public Morphism getInverse()
Returns the inverse morphism, if it exists. If isIsomorphism() is false, this method may return null.