agg.xt_basis
Class ColimDiagram

java.lang.Object
  extended by agg.xt_basis.ColimDiagram
All Implemented Interfaces:
colim.COLIM_DEFS

public class ColimDiagram
extends java.lang.Object
implements colim.COLIM_DEFS

This class allows for representation of general diagrams of graphs and for computation of their colimit. It has capabilities for optional in-place computation of the colimit object in one of the diagram nodes. Attributes are ignored for colimit computation. The colimit computation itself is implemented using the colimit library from Dietmar Wolz.


Field Summary
 
Fields inherited from interface colim.COLIM_DEFS
bottom, undefined
 
Constructor Summary
ColimDiagram(Graph result)
          Construct myself to be an empty diagram where the colimit object is to be computed into the given Graph result.
 
Method Summary
 void addEdge(Morphism morph)
          Add an Morphism as an edge to the diagram.
 void addNode(Graph graph)
          Add a Graph as a node to the diagram.
 void computeColimit()
          Perform the colimit computation for the diagram I'm representing.
 void computeColimit(boolean adoptEntries)
           
 java.util.Vector<GraphObject> getCreatedNodes()
           
 void requestEdge(OrdinaryMorphism morph)
          Request the computation of the given empty morphism as a colimit morphism.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ColimDiagram

public ColimDiagram(Graph result)
Construct myself to be an empty diagram where the colimit object is to be computed into the given Graph result. By adding result as an ordinary diagram node via addNode as well, in-place computation can be achieved.

Pre: result.isGraph().

Method Detail

addNode

public void addNode(Graph graph)
Add a Graph as a node to the diagram.

Pre: graph.isGraph().


addEdge

public void addEdge(Morphism morph)
Add an Morphism as an edge to the diagram.

Pre: morph.getOriginal() and morph.getImage() have been added to the diagram with addNode() before.

See Also:
Morphism.getOriginal(), Morphism.getImage(), addNode(agg.xt_basis.Graph)

computeColimit

public final void computeColimit()
                          throws TypeException
Perform the colimit computation for the diagram I'm representing. The Graph result which has been passed to my constructor becomes the colimit object, and the colimit morphisms requested by requestEdge() are built accordingly.

Throws:
TypeException
See Also:
requestEdge(agg.xt_basis.OrdinaryMorphism)

computeColimit

public final void computeColimit(boolean adoptEntries)
                          throws TypeException
Throws:
TypeException

requestEdge

public final void requestEdge(OrdinaryMorphism morph)
Request the computation of the given empty morphism as a colimit morphism.

Pre:

  1. The domain of morph is empty.
  2. morph.getOriginal() has been added to the diagram via addNode().
  3. morph.getImage() is the result object that has been passed to my constructor.

See Also:
OrdinaryMorphism.getOriginal(), OrdinaryMorphism.getImage(), addNode(agg.xt_basis.Graph)

getCreatedNodes

public java.util.Vector<GraphObject> getCreatedNodes()