traversal bfs - nodef/nvgraph.sh GitHub Wiki

Traverses breadth-first from source vertex.

$ nvgraph traversal-bfs "input" [options]
# input: path of input graph (.mtx)
# -o, --output: path of output file (.json, .yaml)
# -r, --repeat: call nvgraph function multiple times [1]
# -f, --full:   write full results to output file [false]
# -s, --source: source vertex [1]
# → returns distances, predecessors
## Traverse breadth-first from vertex "1"
## : save full results in "out.json"
$ nvgraph traversal-bfs -o out.json -f web-Google.mtx -s 1


## Traverse breadth-first from vertex "2"
## : repeat 10 times for accurate execution time
$ nvgraph traversal-bfs -r 10 web-Google.mtx -s 2