Skip to content
Snippets Groups Projects

aidge#199: Add documentation for Node

Closed Ghost User requested to merge hrouis/aidge_core:issue#199 into dev
1 file
+ 21
6
Compare changes
  • Side-by-side
  • Inline
@@ -41,6 +41,16 @@ class GraphView;
/**
* @brief Object carrying the topological information of the computational graph.
* A Node contains :
* - mName: the name of the Node, should be unique
* - mViews: a set of pointers to GraphView instances including this Node instance
* - mOperator: a pointer to the Operator associated to the node
* - mParents: a vector of parent nodes, which are its inputs
* - mIdOutParents: a vector of indexes, which tells for all the parent nodes from which of their output we take the value
* - mChildren: a vector of vector of children nodes, which lists all the recipient nodes, for all of the outputs
* - mIdInChildren: a vector of vector of indexes, which gives for all the recipient nodes in which of their input the current value is taken
* - mforward: TODO?
* - mbackward: TODO?
*/
class Node : public std::enable_shared_from_this<Node> {
private:
@@ -68,7 +78,9 @@ private:
std::deque<std::function<bool()>> mBackward;
public:
#ifndef DOXYGEN_SHOULD_SKIP_THIS
Node() = delete;
#endif /* DOXYGEN_SHOULD_SKIP_THIS */
/**
* @brief Construct a new Node object associated with the input Operator.
@@ -480,14 +492,17 @@ public:
/**
* @brief Get the set of pointers to connected node at a distance of a delta.
* @details the recution are cut
* @details positive value are toward children, negative toward parents (ex: -2 would give grandparents)
* the recurtion are cut
* Return a nullptr is nofing found.
* @param delta Input delta.
* @return std::shared_ptr<Node>
* @param int delta Input delta.
* @param std::set<Aidge::NodePtr> nodeSee is used in the recursion to avoid looping on the same nodes,
* should be empty when calling the method
* @return std::set<Aidge::NodePtr> set of nodes within expected distance from the original node
*/
std::set<NodePtr> getNodeDelta(int delta,std::set<Aidge::NodePtr> nodeSee);
// TODO
#ifdef PYBIND
std::string repr() const {
std::string nodeString{fmt::format("Node(name='{}', optype='{}'", name(), type())};
@@ -524,8 +539,8 @@ private:
/**
* @brief Set the idInChildren parameter.
* @param inID
* @param newNodeOutID
* @param IOIndex_t inID
* @param IOIndex_t newNodeOutID
*/
void setInputId(const IOIndex_t inID, const IOIndex_t newNodeOutID);
Loading