![]() |
|
A class used for fast sparse traversals of VdfNetworks in the output-to-input direction when the goal is to find all possible paths from an output to a node. More...
#include <sparseInputPathFinder.h>
Public Types | |
| typedef bool(* | InputCallback) (const VdfInput &input) |
Callback to determine if input is a relevant path. | |
Static Public Member Functions | |
| static VDF_API void | Traverse (const VdfMaskedOutput &start, const VdfMaskedOutput &target, InputCallback inputCallback, std::vector< VdfConnectionConstVector > *paths) |
Traverses the network in the input direction sparsely, starting from start trying to find all possible paths into target. | |
| static VDF_API void | FindAllCyclePaths (const VdfMaskedOutput &start, InputCallback inputCallback, std::vector< VdfConnectionConstVector > *paths) |
| Convenience method for a common usage of Traverse() where start == target. | |
A class used for fast sparse traversals of VdfNetworks in the output-to-input direction when the goal is to find all possible paths from an output to a node.
A sparse traversal takes affects masks into account and avoids traversing nodes that don't have an affect on the outputs requested for the traversal. This is most often useful for dependency traversals.
Note that the main point here is to find all possible paths whereas the VdfSparseInputTraverser reports only the first path it finds.
Definition at line 45 of file sparseInputPathFinder.h.
| typedef bool(* InputCallback) (const VdfInput &input) |
Callback to determine if input is a relevant path.
Definition at line 51 of file sparseInputPathFinder.h.
|
static |
Convenience method for a common usage of Traverse() where start == target.
Finds all the paths in a cycle from start back to start.
Note, as in Traverse, the network must be fully connected before making this call.
|
static |
Traverses the network in the input direction sparsely, starting from start trying to find all possible paths into target.
Will populate paths with the results.
Uses inputCallback in order to determine which paths are relevant and should be reported. The default implementation (used when inputCallback is NULL) will treat no path as relevant. This makes the VdfSparseInputPathFinder behave the same way as the sparse input traverser. Only when inputCallback returns true for a specific input a path will treated as a seperate path.