alias_api.traverse_dag
- alias_api.traverse_dag(*args, **kwargs)
Overloaded function.
traverse_dag(node_callback: collections.abc.Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the entire DAG and trigger the provided callback for each node.
For each node in the DAG, the node_callback will be called with the current node being traversed. The node_callback will determine if the current node will be accepted (included) in the traversal output data.
- param node_callback
The node callback during traversal for all nodes
- type node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData
traverse_dag(group_node_callback: collections.abc.Callable[[alias_api.AlDagNode], int], leaf_node_callback: collections.abc.Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the entire DAG and trigger the provided callback for each node.
For each node in the DAG, the one of the provided callbacks will be called with the current node being traversed. The callback will determine if the current node will be accepted (included) in the traversal output data.
- param group_node_callback
The node callback during traversal for group nodes
- type group_node_callback
function(AlDagNode) -> int(AlStatusCode)
- param leaf_node_callback
The node callback during traversal for leaf nodes
- type leaf_node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData
traverse_dag(root: alias_api.AlDagNode, group_node_callback: collections.abc.Callable[[alias_api.AlDagNode], int], leaf_node_callback: collections.abc.Callable[[alias_api.AlDagNode], int]) -> alias_api.TraverseDagOutputData
Traverse the DAG starting at the root node, and trigger the provided callbacks for each node.
For each node in the DAG, the one of the provided callbacks will be called with the current node being traversed. The callback will determine if the current node will be accepted (included) in the traversal output data.
- param root
The root node to start the traversal at
- type root
AlDagNode
- param group_node_callback
The node callback during traversal for group nodes
- type group_node_callback
function(AlDagNode) -> int(AlStatusCode)
- param leaf_node_callback
The node callback during traversal for leaf nodes
- type leaf_node_callback
function(AlDagNode) -> int(AlStatusCode)
- return
The output data from the DAG traversal.
- rtype
TraverseDagOutputData