fr.ocelet.runtime.otypes
Class Ograph

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

public abstract class Ograph
extends java.lang.Object
implements Otype

Generic abstract class that represents any kind of graph used in Ocelet


Field Summary
protected static long edgeCounter
           
 
Constructor Summary
Ograph()
           
 
Method Summary
abstract  void applyInteraction(Interaction gi)
          Applies the given interaction to every edge of the graph.
abstract
<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.
abstract
<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.
abstract  Edge getNewEdge()
          Obtains a new Edge instance for this graph.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

edgeCounter

protected static long edgeCounter
Constructor Detail

Ograph

public Ograph()
Method Detail

getNewEdge

public abstract Edge getNewEdge()
Obtains a new Edge instance for this graph. This gives a possibility for subclasses to provide their own type of Edge. Obtaining an Edge instance does not add an edge to the graph. Adding an edge to the graph can be done through the connect() method.

Returns:
An Edge

connect

public abstract <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 abstract <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 abstract 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.

Parameters:
gi - The Interaction operation to apply.