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
62f4fa5a
Commit
62f4fa5a
authored
4 months ago
by
Octave Perrin
Browse files
Options
Downloads
Patches
Plain Diff
back to graphview
parent
65650935
No related branches found
No related tags found
No related merge requests found
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 @
62f4fa5a
...
...
@@ -30,17 +30,80 @@ void init_GraphView(py::module& m) {
:param path: save location
:type path: str
)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
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
NodePtr
&
)
const
)
&
GraphView
::
inView
)
.
def
(
"in_view"
,
(
bool
(
GraphView
::*
)(
const
std
::
string
&
)
const
)
&
GraphView
::
inView
)
.
def
(
"root_node"
,
&
GraphView
::
rootNode
)
.
def
(
"set_root_node"
,
&
GraphView
::
setRootNode
,
py
::
arg
(
"node"
))
.
def
(
"__repr__"
,
&
GraphView
::
repr
)
.
def
(
"__len__"
,
[](
const
GraphView
&
g
){
return
g
.
getNodes
().
size
();
})
.
def
(
"log_outputs"
,
&
GraphView
::
logOutputs
,
py
::
arg
(
"path"
))
.
def
(
"get_ordered_inputs"
,
&
GraphView
::
getOrderedInputs
)
.
def
(
"get_ordered_outputs"
,
&
GraphView
::
getOrderedOutputs
)
.
def
(
"inputs"
,
(
std
::
vector
<
std
::
pair
<
NodePtr
,
IOIndex_t
>>
(
GraphView
::*
)()
const
)
&
GraphView
::
inputs
,
R"mydelimiter(
List outside input connections of the GraphView.
The vector size is guaranteed to match the number of outside inputs of the GraphView.
If there is no external connection to a given input, a pair of nullptr and gk_IODefaultIndex is returned.
:return: A list containing the pairs Node, input indexes.
:rtype: List[Node, int]
)mydelimiter"
)
.
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
,
R"mydelimiter(
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