|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
N
- Node typeA
- Arc typepublic interface GraphInterface<N,A extends ArcInterface<N>>
Base interface for all Graphs
Method Summary | |
---|---|
boolean |
addArc(N tail,
N head,
WeightedInterface wi)
Adds an arc to the graph |
boolean |
addNode(N node)
Adds a node to the graph |
boolean |
contains(N node)
Checks if the graph contains a node |
java.util.ArrayList<A> |
getArc(N tail)
Gets all arcs which originate from the given node |
java.util.ArrayList<A> |
getArc(N tail,
N head)
Gets all arcs from the tail to the head |
ArcFactory<N,A> |
getArcFactory()
Gets the @see ArcFactory used by the graph |
java.util.ArrayList<N> |
getNodeMap()
Gets a list of nodes in the graph |
int |
getNuArcs()
Number of arcs contained within the graph |
int |
getNuNodes()
Number of nodes contained within the graph |
GraphObserver |
getObserver()
Current GraphObserver |
int |
getVersion()
Gets the version of the graph. |
boolean |
removeArc(N tail)
Removes all arcs with originating from a node |
boolean |
removeArc(N tail,
A arc)
Removes an arc from the graph |
boolean |
removeArc(N tail,
N head)
Removes all arc from the graph |
boolean |
removeNode(N node)
Removes a node from the graph |
void |
resetArcs()
Removes all arcs from the graph |
Method Detail |
---|
boolean addNode(N node)
node
- to add to the graph
boolean removeNode(N node)
node
- to remove from the graph
boolean contains(N node)
node
- to check if it is contained within the graph
boolean addArc(N tail, N head, WeightedInterface wi)
tail
- Tail of the archead
- Head of the arcwi
- WeightedInterface
java.util.ArrayList<A> getArc(N tail)
tail
- tail of the arcs
java.util.ArrayList<A> getArc(N tail, N head)
tail
- tail of the archead
- head of the arc
boolean removeArc(N tail, A arc)
tail
- tail of the arc to removearc
- arc to remove
boolean removeArc(N tail, N head)
tail
- tail of the arc to removehead
- head of the arc to remove
boolean removeArc(N tail)
tail
- tail of the arc
void resetArcs()
ArcFactory<N,A> getArcFactory()
java.util.ArrayList<N> getNodeMap()
GraphObserver getObserver()
int getVersion()
int getNuArcs()
int getNuNodes()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |