|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectnz.ac.waikato.mcennis.rat.graph.GraphIndex
public class GraphIndex
Helper Class that maintains an inverse index - the set of all graphs that an actor belongs to. This is used to facilitate algorithms that change behavior depending on membership in groups.
| Constructor Summary | |
|---|---|
GraphIndex()
|
|
| Method Summary | |
|---|---|
void |
addActor(Actor a,
Graph g)
Add a reference between a graph and an actor. |
void |
addGraph(Graph g)
Adds a graph reference to the object |
Graph[] |
getGraph(Actor a)
Return an array of all graphs that contain the actor or null if no indexed graph contains the actor. |
Graph |
getGraph(java.lang.String s)
Returns the graph with the given ID or null if no graph with this ID is indexed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public GraphIndex()
| Method Detail |
|---|
public void addActor(Actor a,
Graph g)
a - actor referenceg - graph referencepublic void addGraph(Graph g)
g - graph to be addedpublic Graph[] getGraph(Actor a)
a - actor to be checked
public Graph getGraph(java.lang.String s)
s - ID to retrieve graphs from
|
|
||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||