UC Berkeley Group for User Interface Research
Updated November 17, 2000

edu.berkeley.guir.lib.graphs
Class SearchBidirBest

java.lang.Object
  |
  +--edu.berkeley.guir.lib.graphs.SearchBidirBest
All Implemented Interfaces:
GraphConst, GraphSearch, Serializable

public class SearchBidirBest
extends Object
implements GraphConst, GraphSearch, Serializable

A bidirectional best-first-search for Graph. Not implemented yet.

This software is distributed under the Berkeley Software License.

 Revisions:  - GUIRLib-v1.0-1.0.0, Feb 04 2000, 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.3RC1
Version:
GUIRLib-v1.4-1.0.0, Aug 31 2000
Author:
Jason Hong
See Also:
Serialized Form

Fields inherited from interface edu.berkeley.guir.lib.graphs.GraphConst
DEFAULT_NUMBER_EDGES, DEFAULT_NUMBER_NODES, DEFAULT_PATH_SIZE, DEFAULT_WEIGHT, ERROR, TRUE
 
Constructor Summary
SearchBidirBest()
           
 
Method Summary
 void clear()
          Clears out the paths already created while previously searching.
 Path search(Graph g, String strFrom, String strTo)
          Perform a bidirectional Best 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
 

Constructor Detail

SearchBidirBest

public SearchBidirBest()
Method Detail

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 Best 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.

Copyright Information