edu.berkeley.guir.lib.graphs
Class SearchBidirBlind
java.lang.Object
|
+--edu.berkeley.guir.lib.graphs.SearchBidirBlind
- All Implemented Interfaces:
- GraphConst, GraphSearch, Serializable
- public class SearchBidirBlind
- extends Object
- implements GraphConst, GraphSearch, Serializable
A bidirectional blind search on Graph.
This software is distributed under the
Berkeley Software License.
Revisions: - GUIRLib-v1.0-1.0.0, Dec 20 1997, JH
Created class
- GUIRLib-v1.0-1.1.0, Feb 24 2000, JH
Updated for JDK1.3RC1 to use the Collections
- GUIRLib-v1.2-1.0.0, Jun 22 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.3-1.0.0, Aug 11 2000, JH
Touched for GUIRLib release
- GUIRLib-v1.4-1.0.0, Aug 31 2000, JH
Touched for GUIRLib release
- Since:
- 1.1.4
- Version:
- GUIRLib-v1.4-1.0.0, Aug 31 2000
- Author:
- Jason Hong
- See Also:
- Serialized Form
Method Summary |
void |
clear()
Clears out the paths already created while previously searching. |
Path |
search(Graph g,
String strFrom,
String strTo)
Perform a bidirectional blind search on the graph, with the specified
start and target nodes. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SearchBidirBlind
public SearchBidirBlind()
clear
public void clear()
- Clears out the paths already created while previously searching.
This is generally not needed, except when the underlying Graph data
changes.
search
public Path search(Graph g,
String strFrom,
String strTo)
- Perform a bidirectional blind search on the graph, with the specified
start and target nodes. Bidirectional searches are guaranteed to have the
shortest number of hops.
- Specified by:
search
in interface GraphSearch
- Parameters:
g
- is the Graph we are searching in.strFrom
- is the name of the starting node.strTo
- is the name of the target node.- Returns:
- Returns the first successful Path found from the start node
to the target node. The Path is empty if no successful Path
is found, or if either the start or target node does not
exist in the Graph.