fr.ocelet.runtime.relation
Class HyperOgraph

Package class diagram package HyperOgraph
java.lang.Object
  extended by fr.ocelet.runtime.relation.Graph
      extended by fr.ocelet.runtime.relation.HyperOgraph

public abstract class HyperOgraph
extends Graph

Hypergraph implentation. A Hypergraph is needed when more than two vertex are linked together to make one edge in a graph.


Field Summary
protected  edu.uci.ics.jung.graph.SetHypergraph<Role,Edge> shg
           
 
Fields inherited from class fr.ocelet.runtime.relation.Graph
edgeCounter
 
Constructor Summary
HyperOgraph()
           
 
Method Summary
 void applyInteraction(Interaction gi)
          Applies the given interaction to every edge of the graph.
<T extends java.util.Collection<Entity>>
void
connect(T vcol)
          Adds an edge to the graph, linking all together all the entities provided in the argument Collection.
<T extends java.util.Collection<Entity>>
void
disconnect(T vcol)
          Removes from the graph the edge linking together the entities present in the argument Collection.
 
Methods inherited from class fr.ocelet.runtime.relation.Graph
addEdge, getNewEdge, removeEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

shg

protected edu.uci.ics.jung.graph.SetHypergraph<Role,Edge> shg
Constructor Detail

HyperOgraph

public HyperOgraph()
Method Detail

connect

public <T extends java.util.Collection<Entity>> void connect(T vcol)
Adds an edge to the graph, linking all together all the entities provided in the argument Collection.

Parameters:
vcol - A Collection of entities that will be added as vertex to the graph and linked to each other by one edge.

disconnect

public <T extends java.util.Collection<Entity>> void disconnect(T vcol)
Removes from the graph the edge linking together the entities present in the argument Collection.

Parameters:
vcol - A collection of entities.

applyInteraction

public void applyInteraction(Interaction gi)
Applies the given interaction to every edge of the graph. This operation behaves like if the interaction was applied in parallel on all the edges of the graph at the same time.

Specified by:
applyInteraction in class Graph
Parameters:
gi - The Interaction operation to apply.