|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--gshute.graph.GraphSearcher
A GraphSearcher conducts graph searches on searchable graphs.
After creating a graph searcher, a searchable graph is attached to it by calling setGraph(). The search ordering is determined by attaching a dispenser with setDispenser(). A graph search recorder is used to record necessary data as a search progresses and to determine which vertices have been visited. It is attached to the graph searcher by calling setRecorder(). After this setup, the attached graph is searched by calling search().
Field Summary | |
protected Dispenser |
dispenser
dispenser is the dispenser that this GraphSearcher will use to determine the order of visiting vertices. |
protected SearchableGraph |
graph
graph is the graph that this GraphSearcher will search. |
protected GraphSearchRecorder |
recorder
recorder is the graph search recorder that this GraphSearcher will use to record visition of vertices. |
Constructor Summary | |
GraphSearcher()
|
Method Summary | |
void |
search(java.lang.Object start)
gs.search(start) searches the connected component containing start in the graph that is attached to gs. |
void |
setDispenser(Dispenser disp)
gs.setDispenser(disp) attaches the dispenser disp to gs. |
void |
setGraph(SearchableGraph g)
gs.setGraph(g) attaches the graph g to gs. |
void |
setRecorder(GraphSearchRecorder rcrdr)
gs.setRecorder(rcrdr) attaches the recorder rcrdr to gs. |
protected boolean |
visit(java.lang.Object v,
java.lang.Object via)
visit(v, via) handles arrival at a previously unvisited vertex v through edge via. |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
protected SearchableGraph graph
protected Dispenser dispenser
protected GraphSearchRecorder recorder
Constructor Detail |
public GraphSearcher()
Method Detail |
public void search(java.lang.Object start)
Preconditions: A graph has been attached to gs using setGraph(); A dispenser has been attached to gs using setDispenser(); A search recorder has been attached to gs using setRecorder();
public void setGraph(SearchableGraph g)
public void setDispenser(Dispenser disp)
public void setRecorder(GraphSearchRecorder rcrdr)
protected boolean visit(java.lang.Object v, java.lang.Object via)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |