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
1de56521
Commit
1de56521
authored
1 month ago
by
Olivier BICHLER
Browse files
Options
Downloads
Patches
Plain Diff
Removed Node::getNodeDelta()
parent
22f04038
No related branches found
Branches containing commit
No related tags found
1 merge request
!341
Error
Pipeline
#65505
passed
1 month ago
Stage: static_analysis
Stage: build
Stage: test
Stage: coverage
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
include/aidge/graph/Node.hpp
+0
-11
0 additions, 11 deletions
include/aidge/graph/Node.hpp
src/graph/Node.cpp
+0
-29
0 additions, 29 deletions
src/graph/Node.cpp
unit_tests/graph/Test_get.cpp
+0
-55
0 additions, 55 deletions
unit_tests/graph/Test_get.cpp
with
0 additions
and
95 deletions
include/aidge/graph/Node.hpp
+
0
−
11
View file @
1de56521
...
...
@@ -459,17 +459,6 @@ public:
return
node
->
clone
();
}
/**
* @brief Get the set of pointers to connected node at a distance of a delta.
* @details the recution are cut
* Return a nullptr is nofing found.
* @param delta Input delta.
* @return std::shared_ptr<Node>
*/
std
::
set
<
NodePtr
>
getNodeDelta
(
int
delta
,
std
::
set
<
Aidge
::
NodePtr
>
nodeSee
);
#ifdef PYBIND
std
::
string
repr
()
const
{
std
::
string
nodeString
{
fmt
::
format
(
"Node(name='{}', optype='{}'"
,
name
(),
type
())};
...
...
This diff is collapsed.
Click to expand it.
src/graph/Node.cpp
+
0
−
29
View file @
1de56521
...
...
@@ -454,35 +454,6 @@ Aidge::NodePtr Aidge::Node::clone() const {
return
std
::
make_shared
<
Node
>
(
mOperator
->
clone
(),
std
::
make_shared
<
DynamicAttributes
>
(
*
mAttrs
));
}
std
::
set
<
Aidge
::
NodePtr
>
Aidge
::
Node
::
getNodeDelta
(
int
delta
,
std
::
set
<
Aidge
::
NodePtr
>
nodeSee
)
{
std
::
set
<
Aidge
::
NodePtr
>
out
;
nodeSee
.
insert
(
shared_from_this
());
if
(
delta
==
0
)
{
out
.
insert
(
shared_from_this
());
}
else
if
(
delta
>
0
)
{
for
(
const
NodePtr
&
node
:
getChildren
())
{
if
(
nodeSee
.
find
(
node
)
==
nodeSee
.
end
())
{
// loop avoidance
for
(
const
NodePtr
&
ch
:
node
->
getNodeDelta
(
delta
-
1
,
nodeSee
))
{
out
.
insert
(
ch
);
}
}
}
}
else
{
for
(
const
NodePtr
&
node
:
getParents
())
{
if
(
nodeSee
.
find
(
node
)
==
nodeSee
.
end
())
{
// loop avoidance
for
(
const
NodePtr
&
pr
:
node
->
getNodeDelta
(
delta
+
1
,
nodeSee
))
{
out
.
insert
(
pr
);
}
}
}
}
return
out
;
}
Aidge
::
Node
::~
Node
()
=
default
;
// namespace Aidge {
...
...
This diff is collapsed.
Click to expand it.
unit_tests/graph/Test_get.cpp
deleted
100644 → 0
+
0
−
55
View file @
22f04038
/********************************************************************************
* Copyright (c) 2023 CEA-List
*
* This program and the accompanying materials are made available under the
* terms of the Eclipse Public License 2.0 which is available at
* http://www.eclipse.org/legal/epl-2.0.
*
* SPDX-License-Identifier: EPL-2.0
*
********************************************************************************/
#include
<catch2/catch_test_macros.hpp>
#include
"aidge/backend/OperatorImpl.hpp"
#include
"aidge/data/Tensor.hpp"
#include
"aidge/graph/GraphView.hpp"
#include
"aidge/operator/Conv.hpp"
#include
"aidge/operator/GenericOperator.hpp"
#include
"aidge/operator/Producer.hpp"
using
namespace
Aidge
;
TEST_CASE
(
"get Delta"
)
{
std
::
shared_ptr
<
GraphView
>
g1
=
std
::
make_shared
<
GraphView
>
(
"TestGraph"
);
std
::
shared_ptr
<
Node
>
conv
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c"
);
std
::
shared_ptr
<
Node
>
conv1
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c1"
);
std
::
shared_ptr
<
Node
>
conv2
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c2"
);
std
::
shared_ptr
<
Node
>
conv3
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c3"
);
std
::
shared_ptr
<
Node
>
conv3_5
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c3.5"
);
std
::
shared_ptr
<
Node
>
conv4
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c4"
);
std
::
shared_ptr
<
Node
>
conv5
=
GenericOperator
(
"Conv"
,
1
,
0
,
1
,
"c5"
);
g1
->
add
(
conv
);
g1
->
addChild
(
conv1
,
"c"
);
std
::
set
<
Aidge
::
NodePtr
>
see
;
conv
->
getNodeDelta
(
1
,
see
);
SECTION
(
"Self return"
)
{
see
.
clear
();
REQUIRE
(
conv
->
getNodeDelta
(
0
,
see
)
==
std
::
set
<
std
::
shared_ptr
<
Node
>>
{
conv
});
}
SECTION
(
"child"
)
{
see
.
clear
();
REQUIRE
(
conv
->
getNodeDelta
(
1
,
see
)
==
std
::
set
<
std
::
shared_ptr
<
Node
>>
{
conv1
});
}
}
\ No newline at end of file
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