From a1e2eb2af5c68421e2ef4310f49d8cd9d5db927a Mon Sep 17 00:00:00 2001
From: Octave Perrin <operrin@lrtechnologies.fr>
Date: Tue, 12 Nov 2024 13:06:32 +0100
Subject: [PATCH] continuation

---
 include/aidge/graph/GraphView.hpp | 23 +++++++++++++++--------
 1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp
index 2749d5cba..d761af469 100644
--- a/include/aidge/graph/GraphView.hpp
+++ b/include/aidge/graph/GraphView.hpp
@@ -445,16 +445,14 @@ public:
              bool includeLearnableParam = true);
 
     /**
-    //@todo here i am
      * @brief Include a Node in the current GraphView and link it to another
-     * already contained Node.
+     * already contained Node as its child.
      *
      * @param toOtherNode Pointer to the Node to add.
      * @param fromOutNode Pointer to the already included Node the new Node will
      * be linked to (it will become a parent of the new Node). If the GraphView
      * only has one output Node, then default to this Node.
-     * @param fromTensor Ouput Tensor ID of the already included Node. Default to
-     * 0.
+     * @param fromTensor Ouput Tensor ID of the already included Node. Default to 0.
      * @param toTensor Input Tensor ID of the new Node. Default to gk_IODefaultIndex, meaning
      * first available data input for the Node.
      */
@@ -464,15 +462,14 @@ public:
 
     /**
      * @brief Include a Node in the current GraphView and link it to another
-     * already contained Node.
+     * already contained Node as its child.
      *
      * @param toOtherNode Pointer to the Node to add.
      * @param fromOutNodeName Name of the already included Node the new Node will
      * be linked to (it will become a parent of the new Node). As a name is
      * optional, ensure such Node is in the GraphView or it will send back an
      * error message.
-     * @param fromTensor Ouput Tensor ID of the already included Node. Default to
-     * 0.
+     * @param fromTensor Ouput Tensor ID of the already included Node. Default to 0.
      * @param toTensor Input Tensor ID of the new Node. Default to gk_IODefaultIndex, meaning
      * first available data input for the Node.
      */
@@ -483,6 +480,10 @@ public:
         addChild(toOtherNode, mNodeRegistry.at(fromOutNodeName), fromTensor, toTensor);
     }
 
+    /**
+     //todo only updates registery with pair (newName, node) but does not ensure node's name is indeed newName
+     * @brief
+     */
     inline void updateNodeName(const std::shared_ptr<Node>& node, const std::string& newName){
         if (!newName.empty()) {
             auto itNew = mNodeRegistry.insert(std::make_pair(newName, node));
@@ -518,6 +519,7 @@ public:
                           std::pair<NodePtr, IOIndex_t>(nullptr, gk_IODefaultIndex));
 
     /**
+    //@todo not implemented
      * @brief Swap two Node instances if possible.
      * @param node
      * @param otherNode
@@ -526,10 +528,13 @@ public:
      */
     bool swap(Node &node, Node &otherNode);
 
+    //@todo not implemented
     void link(const std::string& name1_inID, const std::string& name2_outID);
 
     /**
-     * @brief Insert a node (newParentNode) as a parent of the passed node (childNode).
+    //@todo why some functions have separate inputs for Node and TensorID (such as here) while other put them in a pair (consistency would be nice)
+     * @brief Insert a node (newParentNode) as a parent of the passed node (childNode)
+     * and as a child of the current parent of the Node.
      *
      * @param childNode Node that gets a new parent.
      * @param newParentNode Inserted Node.
@@ -544,6 +549,7 @@ public:
                         IOIndex_t newParentOutputTensorIdx);
 
     /**
+    //@todo seems messed up, imma skip it for now
      * @brief Replace a set of Nodes in every available GraphView with a new set of Nodes if possible.
      * Both sets should include all the necessary Producers.
      * @details There are 3 cases of replacement:
@@ -569,6 +575,7 @@ public:
      * @brief Clone the GraphView with shared Operators. It is a new GraphView, with cloned Nodes, but the new Nodes refer to the same Operators as the original ones.
      * @return std::shared_ptr<GraphView>
      */
+    //@todo here i am
     inline std::shared_ptr<GraphView> cloneSharedOperators() const {
         return cloneCallback(&Node::cloneSharedOperators);
     }
-- 
GitLab