Description Usage Arguments Details Value
View source: R/greedy_search.R
This strategy uses a greedy search along the original graph. It will navigate to a node tangent to the nearest edge bundle, cross that bundle, then find the next closest bundle, and so on, until at least one edge in each of the specified bundles has been visited.
1 2  greedy_search(graph, edge_bundles, distances, starting_point = 1,
cheat = TRUE, quiet = !interactive())

graph 
An 
edge_bundles 
A list of integer vectors. Each list item will be considered one edge bundle, and each vector the edge indices belonging to that bundle. 
distances 
Double. A vector of length 
starting_point 
Integer. Index of the point from which to start the search. 
cheat 
Boolean. If true, the search algorithm will temporarily treat the graph as undirected if it gets trapped behind a oneway edge, and try to restart its crawl. 
quiet 
Boolean. Display progress? 
The penalty function will make crossing any edge in an alreadycrossed bundle extremely unattractive to the pathfinding function. By setting the edge distance to a very high, but still finite, number, this will allow the path to cross and alreadytraversed edge bundle again if there are no other options available.
A pathfinder_path
object, which is a list with the following elements:
epath
: A list of integer vectors representing the successive edges
crossed by the path
bpath
: A list of integer vectors representing the successive edge bundles
crossed by the path
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.