#include <MappingGraphAlgorithms.h>
Provides graph traversal algorithms for the mapping graph. More...
Provides graph traversal algorithms for the mapping graph.
This class contains static and instance methods that implement various ways to traverse the nodes and component groups defined in a MappingGraph, such as top-down, bottom-up, or arbitrary order. It uses the Visitor pattern to process components during traversal.
Public Member Functions | |
| MappingGraphAlgorithms (MappingGraph *mappingGraph) | |
| Constructor for MappingGraphAlgorithms. More... | |
| void | traverse (MappingGraphVisitor &visitor, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the entire mapping graph nodes in an arbitrary order. More... | |
| void | traverse (MappingGraphVisitor &visitor, VisitorApplication scope, TaskScheduler *taskScheduler) const |
| template<class Callable > | |
| void | traverse_ (const Callable &callable, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the entire mapping graph nodes using a callable function in an arbitrary order. More... | |
| template<class Callable > | |
| void | traverse_ (const Callable &callable, VisitorApplication scope, TaskScheduler *taskScheduler) const |
| void | traverseTopDown (MappingGraphVisitor &visitor, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the mapping graph in a top-down order. More... | |
| template<class Callable > | |
| void | traverseTopDown_ (const Callable &callable, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the mapping graph in a top-down order using a callable function. More... | |
| void | traverseBottomUp (MappingGraphVisitor &visitor, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the mapping graph in a bottom-up order. More... | |
| template<class Callable > | |
| void | traverseBottomUp_ (const Callable &callable, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Traverses the mapping graph in a bottom-up order using a callable function. More... | |
| void | traverseComponentGroups (MappingGraphVisitor &visitor, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Visit and process component groups without any specific order. More... | |
| void | traverseComponentGroups (MappingGraphVisitor &visitor, VisitorApplication scope, TaskScheduler *taskScheduler) const |
| template<class Callable > | |
| void | traverseComponentGroups_ (const Callable &callable, VisitorApplication scope=VisitorApplication::ALL_NODES) const |
| Visit and process component groups without any specific order using a callable function. More... | |
| template<class Callable > | |
| void | traverseComponentGroups_ (const Callable &callable, VisitorApplication scope, TaskScheduler *taskScheduler) const |
|
inlineexplicit |
Constructor for MappingGraphAlgorithms.
| mappingGraph | Pointer to the mapping graph to be traversed. |
| void sofa::simulation::MappingGraphAlgorithms::traverse | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope, | ||
| TaskScheduler * | taskScheduler | ||
| ) | const |
| void sofa::simulation::MappingGraphAlgorithms::traverse | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope = VisitorApplication::ALL_NODES |
||
| ) | const |
Traverses the entire mapping graph nodes in an arbitrary order.
| visitor | The concrete visitor implementation to process each node. |
| scope | Specifies which types of nodes should be visited (e.g., all, or only component groups). |
|
inline |
|
inline |
Traverses the entire mapping graph nodes using a callable function in an arbitrary order.
| Callable | The type of callable object used for visitation. |
| callable | The callable object containing the logic to execute during traversal. |
| scope | Specifies which types of nodes should be visited. |
| void sofa::simulation::MappingGraphAlgorithms::traverseBottomUp | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope = VisitorApplication::ALL_NODES |
||
| ) | const |
Traverses the mapping graph in a bottom-up order.
| visitor | The concrete visitor implementation to process each node. |
| scope | Specifies which types of nodes should be visited. |
|
inline |
Traverses the mapping graph in a bottom-up order using a callable function.
| Callable | The type of callable object used for visitation. |
| callable | The callable object containing the logic to execute during traversal. |
| scope | Specifies which types of nodes should be visited. |
| void sofa::simulation::MappingGraphAlgorithms::traverseComponentGroups | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope, | ||
| TaskScheduler * | taskScheduler | ||
| ) | const |
| void sofa::simulation::MappingGraphAlgorithms::traverseComponentGroups | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope = VisitorApplication::ALL_NODES |
||
| ) | const |
Visit and process component groups without any specific order.
| visitor | The concrete visitor implementation. |
| scope | Specifies which types of nodes should be visited. Defaults to ALL_NODES. |
|
inline |
|
inline |
Visit and process component groups without any specific order using a callable function.
| Callable | The type of callable object used for visitation. |
| callable | The callable object containing the logic to execute during traversal. |
| scope | Specifies which types of nodes should be visited. Defaults to ALL_NODES. |
| void sofa::simulation::MappingGraphAlgorithms::traverseTopDown | ( | MappingGraphVisitor & | visitor, |
| VisitorApplication | scope = VisitorApplication::ALL_NODES |
||
| ) | const |
Traverses the mapping graph in a top-down order.
| visitor | The concrete visitor implementation to process each node. |
| scope | Specifies which types of nodes should be visited. |
|
inline |
Traverses the mapping graph in a top-down order using a callable function.
| Callable | The type of callable object used for visitation. |
| callable | The callable object containing the logic to execute during traversal. |
| scope | Specifies which types of nodes should be visited. |