EDU.neu.ccs.demeter.aplib
Interface StrategyGraphI


public abstract interface StrategyGraphI

A directed graph whose vertices are uniquely labeled with strings and whose edges are uniquely labeled with consecutive ints starting from 0. Also associated with each edge is a constraint (i.e. a boolean predicate) on class graph edges. Additionally, the graph has a set of source vertices and a set of target vertices.


Method Summary
 java.util.Vector getIncomingIndices(java.lang.String l)
          A Vector of Integers of the incoming edges to the vertex labeled l.
 java.util.Vector getOutgoingIndices(java.lang.String l)
          A Vector of Integers of the outgoing edges from the vertex labeled l.
 java.util.Enumeration getSources()
          An Enumeration of Strings which label the source vertices, or null if the strategy is "from *".
 java.util.Enumeration getTargets()
          An Enumeration of Strings which label the target vertices, or null if the strategy is "to *".
 java.util.Enumeration getVertices()
          An Enumeration of Strings which label the vertices in the strategy graph.
 boolean meetsConstraint(int i, EdgeI edge, NameMapI nameMap)
          Does the edge in the class graph meet the constraint on the ith strategy edge, given the name map? The name map is a total map and maps labels in the strategy graph to labels in the class graph.
 int numEdges()
          The number of edges in the strategy graph.
 

Method Detail

getVertices

public java.util.Enumeration getVertices()
An Enumeration of Strings which label the vertices in the strategy graph.

getSources

public java.util.Enumeration getSources()
An Enumeration of Strings which label the source vertices, or null if the strategy is "from *".

getTargets

public java.util.Enumeration getTargets()
An Enumeration of Strings which label the target vertices, or null if the strategy is "to *".

numEdges

public int numEdges()
The number of edges in the strategy graph.

getIncomingIndices

public java.util.Vector getIncomingIndices(java.lang.String l)
A Vector of Integers of the incoming edges to the vertex labeled l.

getOutgoingIndices

public java.util.Vector getOutgoingIndices(java.lang.String l)
A Vector of Integers of the outgoing edges from the vertex labeled l.

meetsConstraint

public boolean meetsConstraint(int i,
                               EdgeI edge,
                               NameMapI nameMap)
Does the edge in the class graph meet the constraint on the ith strategy edge, given the name map? The name map is a total map and maps labels in the strategy graph to labels in the class graph.