DFS Module
Provides depth-first traversal functions.
Functions and values
| Function or value |
Description
|
Full Usage:
foldPostorder g fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the postorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
foldPostorderWithRoots g roots fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> seq
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the postorder traversal, starting from the given root vertices.
|
Full Usage:
foldPreorder g fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the preorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
foldPreorderWithRoots g roots fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> list
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the preorder traversal, starting from the given root vertices.
|
Full Usage:
foldRevPostorder g fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the reverse postorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
foldRevPostorderWithRoots g roots fn acc
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> seq
fn : 'c -> IVertex<'a> -> 'c
acc : 'c
Returns: 'c
Type parameters: 'a, 'b, 'c (requires equality and equality) |
Folds vertices of the graph in a depth-first manner with the reverse postorder traversal, starting from the given root vertices.
|
Full Usage:
iterPostorder g fn
Parameters:
IDiGraphAccessible<'a, 'b>
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the postorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
iterPostorderWithRoots g roots fn
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> seq
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the postorder traversal, starting from the given root vertices.
|
Full Usage:
iterPreorder g fn
Parameters:
IDiGraphAccessible<'a, 'b>
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the preorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
iterPreorderWithRoots g roots fn
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> list
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the preorder traversal, starting from the given root vertices.
|
Full Usage:
iterRevPostorder g fn
Parameters:
IDiGraphAccessible<'a, 'b>
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the reverse postorder traversal. This function visits every vertex in the graph including unreachable ones. For those unreachable vertices, the order is random.
|
Full Usage:
iterRevPostorderWithRoots g roots fn
Parameters:
IDiGraphAccessible<'a, 'b>
roots : IVertex<'a> seq
fn : IVertex<'a> -> unit
Type parameters: 'a, 'b (requires equality and equality) |
Iterates vertices of the graph in a depth-first manner with the reverse postorder traversal, starting from the given root vertices.
|
B2R2