fr.ocelet.runtime.otypes
Class RegularOgraph

Package class diagram package RegularOgraph
java.lang.Object
  extended by fr.ocelet.runtime.otypes.Ograph
      extended by fr.ocelet.runtime.otypes.RegularOgraph
All Implemented Interfaces:
Otype

public abstract class RegularOgraph
extends Ograph

Regular graph implementation. We call a graph regular if its edges connect two vertex (and only two). In other words, a regular graph is not a hypergraph.


Field Summary
protected  edu.uci.ics.jung.graph.DirectedSparseMultigraph<Role,Edge> dsmg
           
 
Fields inherited from class fr.ocelet.runtime.otypes.Ograph
edgeCounter
 
Constructor Summary
protected RegularOgraph()
          Protected constructor
 
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.otypes.Ograph
getNewEdge
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dsmg

protected edu.uci.ics.jung.graph.DirectedSparseMultigraph<Role,Edge> dsmg
Constructor Detail

RegularOgraph

protected RegularOgraph()
Protected constructor

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.

Specified by:
connect in class Ograph
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.

Specified by:
disconnect in class Ograph
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 Ograph
Parameters:
gi - The Interaction operation to apply.