From 430378f4101728fb3d78bc90d33f9d004580908c Mon Sep 17 00:00:00 2001 From: cmoineau <cyril.moineau@cea.fr> Date: Fri, 28 Feb 2025 15:36:43 +0000 Subject: [PATCH] Update replace documentation according to changes. --- include/aidge/graph/GraphView.hpp | 3 +++ src/graph/GraphView.cpp | 12 ++++++------ 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp index 8ac05b5b8..f6297f790 100644 --- a/include/aidge/graph/GraphView.hpp +++ b/include/aidge/graph/GraphView.hpp @@ -523,6 +523,9 @@ public: * - same number of input/output connections in oldNodes, parents and children are linked according * to these connections IDs * - different number of input/output connections in oldNodes => return false + * Case 4: newNodes set has no input and one output, oldNodes has any input and one output + * - reconnect output + * - all input are disconnected * @param oldNodes * @param newNodes * @return true replacement has been performed diff --git a/src/graph/GraphView.cpp b/src/graph/GraphView.cpp index 91cc0f889..533c9dc25 100644 --- a/src/graph/GraphView.cpp +++ b/src/graph/GraphView.cpp @@ -1157,12 +1157,12 @@ void Aidge::GraphView::insertParent(NodePtr childNode, /** * Inputs conditions: - * | old \ new | 1 node, 1 input | >1 node, 1 input | 1 node, >1 inputs | >1 node, >1 inputs | - * | ------------------- | ---------------- | ----------------- | ------------------ | ------------------ | - * | 1 node, 1 input | trivial | trivial | broadcast | broadcast | - * | >1 node, 1 input | trivial | trivial | broadcast | broadcast | - * | 1 node, >1 inputs | (take first) | (take first) | same order | X | - * | >1 node, >1 inputs | X | X | X | X | + * | old \ new | 1 node, 1 input | >1 node, 1 input | 1 node, >1 inputs | >1 node, >1 inputs | >=1 node, 0 inputs | + * | ------------------- | ---------------- | ----------------- | ------------------ | ------------------ | ------------------ | + * | 1 node, 1 input | trivial | trivial | broadcast | broadcast | trivial | + * | >1 node, 1 input | trivial | trivial | broadcast | broadcast | trivial | + * | 1 node, >1 inputs | (take first) | (take first) | same order | X | trivial | + * | >1 node, >1 inputs | X | X | X | X | trivial | * * Outputs conditions: * | old \ new | 1 node, 1 output | >1 node, 1 output | 1 node, >1 outputs | >1 node, >1 outputs | -- GitLab