Class: GraphFinder

bu.street. GraphFinder


new GraphFinder(equalsFunc, hashFunc)

Parameters:
Name Type Description
equalsFunc function

Node equality function.

hashFunc function

Node hash function.

Source:
bu-street/graphfinder.js

Extends

  • ol.Object

Methods


next()

Return the next node for the current search, or null if no more nodes.

Source:
bu-street/graphfinder.js
Returns:

Next node to search or null if ended.

Type
Object

reset()

Reset search state, aborting any search already in progress.

Source:
bu-street/graphfinder.js

start(firstNode, neighborsFunc, exploreFunc)

Start a breadth-first search beginning at firstNode.

Parameters:
Name Type Description
firstNode Object

Node.

neighborsFunc function

Function that receives a node and returns a list of neighbors for a node.

exploreFunc function

Function that receives a node and returns whether a node should be explored.

Source:
bu-street/graphfinder.js