holoscan.graphs
This module provides a Python API for the C++ API Graph classes.
<a href="#holoscan.graphs.FlowGraph">holoscan.graphs.FlowGraph</a> |
alias of <a href="#holoscan.graphs.OperatorFlowGraph">holoscan.graphs._graphs.OperatorFlowGraph</a> |
<a href="#holoscan.graphs.FragmentFlowGraph">holoscan.graphs.FragmentFlowGraph</a> |
Directed graph class. |
<a href="#holoscan.graphs.OperatorFlowGraph">holoscan.graphs.OperatorFlowGraph</a> |
Directed graph class. |
- holoscan.graphs.FlowGraph
alias of <a href="#holoscan.graphs.OperatorFlowGraph">holoscan.graphs._graphs.OperatorFlowGraph</a>
- class holoscan.graphs.FragmentFlowGraph
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.FragmentGraph">holoscan.graphs._graphs.FragmentGraph</a>
Directed graph class.
Attributes
<a href="#holoscan.graphs.FragmentFlowGraph.context">context</a>
The graph's context (as an opaque PyCapsule object) Methods
<a href="#holoscan.graphs.FragmentFlowGraph.add_node">add_node</a>
(self, node)Add the node to the graph. <a href="#holoscan.graphs.FragmentFlowGraph.get_next_nodes">get_next_nodes</a>
(self, arg0)Get the nodes immediately downstream of a given node. <a href="#holoscan.graphs.FragmentFlowGraph.get_nodes">get_nodes</a>
(self)Get all nodes. <a href="#holoscan.graphs.FragmentFlowGraph.get_port_map">get_port_map</a>
(self, arg0, arg1)<a href="#holoscan.graphs.FragmentFlowGraph.get_previous_nodes">get_previous_nodes</a>
(self, arg0)Get the nodes immediately upstream of a given node. <a href="#holoscan.graphs.FragmentFlowGraph.get_root_nodes">get_root_nodes</a>
(self)Get all root nodes. <a href="#holoscan.graphs.FragmentFlowGraph.is_leaf">is_leaf</a>
(self, node)Check if the node is a leaf node. <a href="#holoscan.graphs.FragmentFlowGraph.is_root">is_root</a>
(self, node)Check if the node is a root node. - __init__(self: holoscan.graphs._graphs.FragmentFlowGraph) → None
Directed graph class.
- add_node(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → None
Add the node to the graph.
- Parameters
- node
The node to add.
- property context
The graph’s context (as an opaque PyCapsule object)
- get_next_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph, arg0: holoscan::Fragment) → vector_of_node_type
Get the nodes immediately downstream of a given node.
- Parameters
- node
A node in the graph.
- Returns
- list of Operator or Fragment
A list containing the downstream nodes.
- get_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph) → vector_of_node_type
Get all nodes.
The nodes are returned in the order they were added to the graph.
- Returns
- list of Operator or Fragment
A list containing all nodes.
- get_port_map(self: holoscan.graphs._graphs.FragmentFlowGraph, arg0: holoscan::Fragment, arg1: holoscan::Fragment) → dict
- get_previous_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph, arg0: holoscan::Fragment) → vector_of_node_type
Get the nodes immediately upstream of a given node.
- Parameters
- node
A node in the graph.
- Returns
- list of Operator or Fragment
A list containing the upstream nodes.
- get_root_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph) → vector_of_node_type
Get all root nodes.
- Returns
- list of Operator or Fragment
A list containing all root nodes.
- is_leaf(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → bool
Check if the node is a leaf node.
- Parameters
- node
A node in the graph.
- Returns
- bool
Whether the node is a leaf node
- is_root(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → bool
Check if the node is a root node.
- Parameters
- node
A node in the graph.
- Returns
- bool
Whether the node is a root node
- class holoscan.graphs.OperatorFlowGraph
Bases:
<a href="holoscan_python_api_core.html#holoscan.core.OperatorGraph">holoscan.graphs._graphs.OperatorGraph</a>
Directed graph class.
Attributes
<a href="#holoscan.graphs.OperatorFlowGraph.context">context</a>
The graph's context (as an opaque PyCapsule object) Methods
<a href="#holoscan.graphs.OperatorFlowGraph.add_node">add_node</a>
(self, node)Add the node to the graph. <a href="#holoscan.graphs.OperatorFlowGraph.get_next_nodes">get_next_nodes</a>
(self, arg0)Get the nodes immediately downstream of a given node. <a href="#holoscan.graphs.OperatorFlowGraph.get_nodes">get_nodes</a>
(self)Get all nodes. <a href="#holoscan.graphs.OperatorFlowGraph.get_port_map">get_port_map</a>
(self, arg0, arg1)<a href="#holoscan.graphs.OperatorFlowGraph.get_previous_nodes">get_previous_nodes</a>
(self, arg0)Get the nodes immediately upstream of a given node. <a href="#holoscan.graphs.OperatorFlowGraph.get_root_nodes">get_root_nodes</a>
(self)Get all root nodes. <a href="#holoscan.graphs.OperatorFlowGraph.is_leaf">is_leaf</a>
(self, node)Check if the node is a leaf node. <a href="#holoscan.graphs.OperatorFlowGraph.is_root">is_root</a>
(self, node)Check if the node is a root node. - __init__(self: holoscan.graphs._graphs.OperatorFlowGraph) → None
Directed graph class.
- add_node(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → None
Add the node to the graph.
- Parameters
- node
The node to add.
- property context
The graph’s context (as an opaque PyCapsule object)
- get_next_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph, arg0: holoscan::Operator) → vector_of_node_type
Get the nodes immediately downstream of a given node.
- Parameters
- node
A node in the graph.
- Returns
- list of Operator or Fragment
A list containing the downstream nodes.
- get_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph) → vector_of_node_type
Get all nodes.
The nodes are returned in the order they were added to the graph.
- Returns
- list of Operator or Fragment
A list containing all nodes.
- get_port_map(self: holoscan.graphs._graphs.OperatorFlowGraph, arg0: holoscan::Operator, arg1: holoscan::Operator) → dict
- get_previous_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph, arg0: holoscan::Operator) → vector_of_node_type
Get the nodes immediately upstream of a given node.
- Parameters
- node
A node in the graph.
- Returns
- list of Operator or Fragment
A list containing the upstream nodes.
- get_root_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph) → vector_of_node_type
Get all root nodes.
- Returns
- list of Operator or Fragment
A list containing all root nodes.
- is_leaf(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → bool
Check if the node is a leaf node.
- Parameters
- node
A node in the graph.
- Returns
- bool
Whether the node is a leaf node
- is_root(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → bool
Check if the node is a root node.
- Parameters
- node
A node in the graph.
- Returns
- bool
Whether the node is a root node