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
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
Cyril Moineau
aidge_core
Commits
3d53ab30
Commit
3d53ab30
authored
10 months ago
by
Cyril Moineau
Committed by
Cyril Moineau
10 months ago
Browse files
Options
Downloads
Patches
Plain Diff
[Fix] Node name is now updated in GraphViews.
parent
1ffaf28c
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/aidge/graph/GraphView.hpp
+7
-1
7 additions, 1 deletion
include/aidge/graph/GraphView.hpp
include/aidge/graph/Node.hpp
+4
-4
4 additions, 4 deletions
include/aidge/graph/Node.hpp
src/graph/Node.cpp
+4
-1
4 additions, 1 deletion
src/graph/Node.cpp
with
15 additions
and
6 deletions
include/aidge/graph/GraphView.hpp
+
7
−
1
View file @
3d53ab30
...
...
@@ -160,7 +160,7 @@ public:
/**
* @brief List outside input connections of the GraphView. The vector
* size is garanteed to match the number of outside inputs of the GraphView. If there is
* size is g
u
aranteed 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 std::vector<std::pair<NodePtr, IOIndex_t>>
*/
...
...
@@ -376,6 +376,12 @@ public:
addChild
(
toOtherNode
,
mNodeRegistry
.
at
(
fromOutNodeName
),
fromTensor
,
toTensor
);
}
inline
void
updateNodeName
(
const
std
::
string
&
oldName
,
const
std
::
string
&
newName
){
AIDGE_ASSERT
(
mNodeRegistry
.
find
(
oldName
)
!=
mNodeRegistry
.
end
(),
"No node named {} in graph {}, the graph may be corrupted !"
,
oldName
,
name
());
mNodeRegistry
[
newName
]
=
mNodeRegistry
[
oldName
];
mNodeRegistry
.
erase
(
oldName
);
}
/**
* @brief Include a GraphView content in the current GraphView and link
* the two sets by linking one Node from each GraphView.
...
...
This diff is collapsed.
Click to expand it.
include/aidge/graph/Node.hpp
+
4
−
4
View file @
3d53ab30
...
...
@@ -235,8 +235,8 @@ public:
///////////////////////////////////////////////////////
/**
* @brief
Vector
of pointers to each GraphView containing th
e object
* @return std::
vector
<GraphView>
* @brief
Set
of pointers to each GraphView containing th
is Node
* @return std::
set
<GraphView>
*/
inline
std
::
set
<
std
::
shared_ptr
<
GraphView
>>
views
()
const
noexcept
{
std
::
set
<
std
::
shared_ptr
<
GraphView
>>
res
;
...
...
@@ -460,10 +460,10 @@ private:
// OPERATOR FUNCTIONNAL but commented out to avoid iostream inclusion
// /**
// * @brief operator<< overload to ease print & debug of nodes
// * @param[inout] ostream to print to
// * @param[inout] ostream to print to
// * @param[in] n node to print
// */
// friend std::ostream& operator << (std::ostream& os, Node& n);
// friend std::ostream& operator << (std::ostream& os, Node& n);
};
}
// namespace Aidge
...
...
This diff is collapsed.
Click to expand it.
src/graph/Node.cpp
+
4
−
1
View file @
3d53ab30
...
...
@@ -57,7 +57,10 @@ Aidge::Connector Aidge::Node::operator()(const std::vector<Connector>& ctors) {
// INNER
///////////////////////////////////////////////////////
void
Aidge
::
Node
::
setName
(
const
std
::
string
&
name
)
{
mName
=
name
;
}
void
Aidge
::
Node
::
setName
(
const
std
::
string
&
name
)
{
for
(
auto
graphView
:
views
())
graphView
->
updateNodeName
(
mName
,
name
);
mName
=
name
;
}
///////////////////////////////////////////////////////
// OPERATORS
...
...
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