Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
aidge_core
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Eclipse Projects
aidge
aidge_core
Commits
cf6aff09
Commit
cf6aff09
authored
5 months ago
by
Octave Perrin
Browse files
Options
Downloads
Patches
Plain Diff
back to graphview
parent
2c94e087
No related branches found
No related tags found
1 merge request
!245
aidge_core#194: Add documentation for GraphView
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
python_binding/graph/pybind_GraphView.cpp
+74
-11
74 additions, 11 deletions
python_binding/graph/pybind_GraphView.cpp
with
74 additions
and
11 deletions
python_binding/graph/pybind_GraphView.cpp
+
74
−
11
View file @
cf6aff09
...
@@ -30,17 +30,80 @@ void init_GraphView(py::module& m) {
...
@@ -30,17 +30,80 @@ void init_GraphView(py::module& m) {
:param path: save location
:param path: save location
:type path: str
:type path: str
)mydelimiter"
)
)mydelimiter"
)
.
def
(
"inputs"
,
(
std
::
vector
<
std
::
pair
<
NodePtr
,
IOIndex_t
>>
(
GraphView
::*
)()
const
)
&
GraphView
::
inputs
)
.
def
(
"outputs"
,
(
std
::
vector
<
std
::
vector
<
std
::
pair
<
NodePtr
,
IOIndex_t
>>>
(
GraphView
::*
)()
const
)
&
GraphView
::
outputs
)
.
def
(
"inputs"
,
(
std
::
vector
<
std
::
pair
<
NodePtr
,
IOIndex_t
>>
(
GraphView
::*
)()
const
)
&
GraphView
::
inputs
,
.
def
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
NodePtr
&
)
const
)
&
GraphView
::
inView
)
R"mydelimiter(
.
def
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
std
::
string
&
)
const
)
&
GraphView
::
inView
)
List outside input connections of the GraphView.
.
def
(
"root_node"
,
&
GraphView
::
rootNode
)
The vector size is guaranteed to match the number of outside inputs of the GraphView.
.
def
(
"set_root_node"
,
&
GraphView
::
setRootNode
,
py
::
arg
(
"node"
))
If there is no external connection to a given input, a pair of nullptr and gk_IODefaultIndex is returned.
.
def
(
"__repr__"
,
&
GraphView
::
repr
)
:return: A list containing the pairs Node, input indexes.
.
def
(
"__len__"
,
[](
const
GraphView
&
g
){
return
g
.
getNodes
().
size
();
})
:rtype: List[Node, int]
.
def
(
"log_outputs"
,
&
GraphView
::
logOutputs
,
py
::
arg
(
"path"
))
)mydelimiter"
)
.
def
(
"get_ordered_inputs"
,
&
GraphView
::
getOrderedInputs
)
.
def
(
"get_ordered_outputs"
,
&
GraphView
::
getOrderedOutputs
)
.
def
(
"outputs"
,
(
std
::
vector
<
std
::
vector
<
std
::
pair
<
NodePtr
,
IOIndex_t
>>>
(
GraphView
::*
)()
const
)
&
GraphView
::
outputs
,
R"mydelimiter(
List outside output connections of the GraphView.
The vector size is guaranteed to match the number of outputs of the GraphView.
If there is no connection to a given output, the corresponding sub-vector will be empty.
:return: A list containing the pairs Node, output indexes.
:rtype: List[Node, int]
)mydelimiter"
)
.
def
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
NodePtr
&
)
const
)
&
GraphView
::
inView
,
R"mydelimiter(
Check that a node is in the current GraphView.
:param NodePtr: The Node that is checked
:type Node: Node that is checked
:return: True if the Node is in the GraphView, False otherwise
:rtype: bool
)mydelimiter"
)
.
def
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
std
::
string
&
)
const
)
&
GraphView
::
inView
,
R"mydelimiter(
Check that a node is in the current GraphView based on its name.
:param nodeName: The name of the Node that is checked
:type nodeName: Node
:return: True if the Node is in the GraphView, False otherwise
:rtype: bool
)mydelimiter"
)
.
def
(
"root_node"
,
&
GraphView
::
rootNode
,
R"mydelimiter(
Returns the rootNode of the GraphView
:return: The root Node of the GraphView
:rtype: Node
)mydelimiter"
)
.
def
(
"set_root_node"
,
&
GraphView
::
setRootNode
,
py
::
arg
(
"node"
),
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"__repr__"
,
&
GraphView
::
repr
,
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"__len__"
,
[](
const
GraphView
&
g
){
return
g
.
getNodes
().
size
();
},
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"log_outputs"
,
&
GraphView
::
logOutputs
,
py
::
arg
(
"path"
),
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"get_ordered_inputs"
,
&
GraphView
::
getOrderedInputs
,
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"get_ordered_outputs"
,
&
GraphView
::
getOrderedOutputs
,
R"mydelimiter(
TODO
)mydelimiter"
)
.
def
(
"get_output_nodes"
,
&
GraphView
::
outputNodes
,
.
def
(
"get_output_nodes"
,
&
GraphView
::
outputNodes
,
R"mydelimiter(
R"mydelimiter(
Get set of output Nodes.
Get set of output Nodes.
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment