|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface TopSortInterface
Interface to allow building top-sort, by calling TopSort.buildTopSort()
Method Summary | |
---|---|
boolean |
isTopSorted(boolean forward)
Return true if no resetTopSorted(forward) has been executed since the last setTopSorted(forward) has been executed |
int |
numberOfNodes()
Return the number of nodes in the graph |
void |
resetTopSorted()
Should have a side effect such that isTopSorted(forward) returns the correct value. |
void |
setTopSorted(boolean forward)
Should have a side effect such that isTopSorted(forward) returns the correct value. |
SortedGraphNode |
startNode(boolean forward)
Return the start node if forward = true for forward topsort, and return the end node if forward = false for backward topsort. |
Method Detail |
---|
SortedGraphNode startNode(boolean forward)
forward
- whether we are viewing the graph in the forward direction
int numberOfNodes()
boolean isTopSorted(boolean forward)
forward
- whether we are viewing the graph in the forward direction
void setTopSorted(boolean forward)
forward
- whether we are viewing the graph in the forward directionvoid resetTopSorted()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |