holoscan.graphs
此模块为 C++ API Graph 类提供 Python API。
- holoscan.graphs.FlowGraph
- class holoscan.graphs.FragmentFlowGraph
基类:
holoscan.graphs._graphs.FragmentGraph
有向图类。
属性
context
图的上下文(作为不透明的 PyCapsule 对象) 方法
add_node
(self, node)将节点添加到图中。 get_next_nodes
(self, arg0)获取给定节点的直接下游节点。 get_nodes
(self)获取所有节点。 get_port_map
(self, arg0, arg1)get_previous_nodes
(self, arg0)获取给定节点的直接上游节点。 get_root_nodes
(self)获取所有根节点。 is_leaf
(self, node)检查节点是否为叶节点。 is_root
(self, node)检查节点是否为根节点。 - __init__(self: holoscan.graphs._graphs.FragmentFlowGraph) → None
有向图类。
- add_node(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → None
将节点添加到图中。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
要添加的节点。
- property context
图的上下文(作为不透明的 PyCapsule 对象)
- get_next_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph, arg0: holoscan::Fragment) → vector_of_node_type
获取给定节点的直接下游节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- Operator 或 Fragment 列表
包含下游节点的列表。
- get_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph) → vector_of_node_type
获取所有节点。
节点按照添加到图中的顺序返回。
- 返回值
- Operator 或 Fragment 列表
包含所有节点的列表。
- 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
获取给定节点的直接上游节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- Operator 或 Fragment 列表
包含上游节点的列表。
- get_root_nodes(self: holoscan.graphs._graphs.FragmentFlowGraph) → vector_of_node_type
获取所有根节点。
- 返回值
- Operator 或 Fragment 列表
包含所有根节点的列表。
- is_leaf(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → bool
检查节点是否为叶节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- bool
节点是否为叶节点
- is_root(self: holoscan.graphs._graphs.FragmentFlowGraph, node: holoscan::Fragment) → bool
检查节点是否为根节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- bool
节点是否为根节点
- class holoscan.graphs.OperatorFlowGraph
基类:
holoscan.graphs._graphs.OperatorGraph
有向图类。
属性
context
图的上下文(作为不透明的 PyCapsule 对象) 方法
add_node
(self, node)将节点添加到图中。 get_next_nodes
(self, arg0)获取给定节点的直接下游节点。 get_nodes
(self)获取所有节点。 get_port_map
(self, arg0, arg1)get_previous_nodes
(self, arg0)获取给定节点的直接上游节点。 get_root_nodes
(self)获取所有根节点。 is_leaf
(self, node)检查节点是否为叶节点。 is_root
(self, node)检查节点是否为根节点。 - __init__(self: holoscan.graphs._graphs.OperatorFlowGraph) → None
有向图类。
- add_node(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → None
将节点添加到图中。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
要添加的节点。
- property context
图的上下文(作为不透明的 PyCapsule 对象)
- get_next_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph, arg0: holoscan::Operator) → vector_of_node_type
获取给定节点的直接下游节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- Operator 或 Fragment 列表
包含下游节点的列表。
- get_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph) → vector_of_node_type
获取所有节点。
节点按照添加到图中的顺序返回。
- 返回值
- Operator 或 Fragment 列表
包含所有节点的列表。
- 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
获取给定节点的直接上游节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- Operator 或 Fragment 列表
包含上游节点的列表。
- get_root_nodes(self: holoscan.graphs._graphs.OperatorFlowGraph) → vector_of_node_type
获取所有根节点。
- 返回值
- Operator 或 Fragment 列表
包含所有根节点的列表。
- is_leaf(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → bool
检查节点是否为叶节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- bool
节点是否为叶节点
- is_root(self: holoscan.graphs._graphs.OperatorFlowGraph, node: holoscan::Operator) → bool
检查节点是否为根节点。
- 参数
- nodeholoscan.core.Operator | holoscan.core.Fragment
图中的一个节点。
- 返回值
- bool
节点是否为根节点