Skip to content
Snippets Groups Projects

#194: Add documentation for GraphView

Open #194: Add documentation for GraphView
All threads resolved!
Open Ghost User requested to merge hrouis/aidge_core:aidge_core#194 into dev
All threads resolved!
1 file
+ 17
11
Compare changes
  • Side-by-side
  • Inline
@@ -115,7 +115,7 @@ public:
@@ -115,7 +115,7 @@ public:
/**
/**
* @brief Set the GraphView name.
* @brief Set the GraphView name.
* @warning Undefined behaviour when several GraphViews have the same name. @todo to check if true
* @warning Undefined behaviour when several GraphViews have the same name. @todo to check if still true as it is a copy paste from Node
* @param name New name for the GraphView.
* @param name New name for the GraphView.
*/
*/
inline void setName(const std::string &name) { mName = name; }
inline void setName(const std::string &name) { mName = name; }
@@ -135,13 +135,19 @@ public:
@@ -135,13 +135,19 @@ public:
*/
*/
void save(const std::string& path, bool verbose = false, bool showProducers = true) const;
void save(const std::string& path, bool verbose = false, bool showProducers = true) const;
 
/**
 
* @brief Logs the output of all nodes of the graph in a directory
 
* @details in the specified directory, it will create a subdirectory for each Node of the GraphView
 
* In that sub-directory, each output of the Node will be saved in a different .log file
 
* @param string dirName Path of the directory where the logs shall be stocked
 
*/
void logOutputs(const std::string& dirName) const;
void logOutputs(const std::string& dirName) const;
/**
/**
* Check that a node is in the current GraphView.
* @brief Check that a node is in the current GraphView.
* @param nodePtr Node to check
* @param nodePtr Node to check
* @return bool True if nodePtr belongs to the GraphView.
* @return bool True if nodePtr belongs to the GraphView.
*/
*/
bool inView(const NodePtr& nodePtr) const;
bool inView(const NodePtr& nodePtr) const;
/**
/**
@@ -152,7 +158,7 @@ public:
@@ -152,7 +158,7 @@ public:
bool inView(const std::string& nodeName) const;
bool inView(const std::string& nodeName) const;
/**
/**
* Retruns the rootNode of the GraphView
* Returns the rootNode of the GraphView
* @return NodePtr of the rootNode
* @return NodePtr of the rootNode
*/
*/
inline NodePtr rootNode() const noexcept {
inline NodePtr rootNode() const noexcept {
@@ -181,12 +187,12 @@ public:
@@ -181,12 +187,12 @@ public:
/** @brief Assess if the given Node is an output Node of the GraphView object. */
/** @brief Assess if the given Node is an output Node of the GraphView object. */
bool isOutputNode(const NodePtr& nodePtr) const;
bool isOutputNode(const NodePtr& nodePtr) const;
/** @todo here i am
/** @todo
*/
*/
void setOrderedInputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& inputs);
void setOrderedInputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& inputs);
void setOrderedOutputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& outputs);
void setOrderedOutputs(const std::vector<std::pair<NodePtr, IOIndex_t>>& outputs);
/**
/** @todo i don't understand the description
* @brief Get a topological node order for an acyclic walk of the graph
* @brief Get a topological node order for an acyclic walk of the graph
* Graph cycles are broken on operator back edges such that resolution on
* Graph cycles are broken on operator back edges such that resolution on
* single level lattice can be done in a single pass as it is
* single level lattice can be done in a single pass as it is
@@ -220,13 +226,13 @@ public:
@@ -220,13 +226,13 @@ public:
/**
/**
* @brief List outside data input connections of the GraphView.
* @brief List outside data input connections of the GraphView.
* Data inputs exclude inputs expecting parameters (weights or bias).
* Data inputs exclude inputs expecting parameters (weights or bias).
* The vector size is garanteed to match the number of outside data inputs of the GraphView. If there is
* The vector size is guaranteed to match the number of outside data inputs of the GraphView. If there is
* no external connection to a given input, a pair of nullptr and gk_IODefaultIndex is returned.
* no external connection to a given input, a pair of nullptr and gk_IODefaultIndex is returned. @todo check it, for me it seem every unconnected input will add some nullptr to the list
* @return std::vector<std::pair<NodePtr, IOIndex_t>>
* @return std::vector<std::pair<NodePtr, IOIndex_t>>
*/
*/
std::vector<std::pair<NodePtr, IOIndex_t>> dataInputs() const;
std::vector<std::pair<NodePtr, IOIndex_t>> dataInputs() const;
/**
/** @todo check it
* @brief List all dataInput connections (within and outside) of the specified GraphView node named "name".
* @brief List all dataInput connections (within and outside) of the specified GraphView node named "name".
* Data inputs exclude inputs expecting parameters (weights or bias).
* Data inputs exclude inputs expecting parameters (weights or bias).
* @param name Name of the Node.
* @param name Name of the Node.
@@ -234,7 +240,7 @@ public:
@@ -234,7 +240,7 @@ public:
*/
*/
inline auto dataInputs(const std::string name) const { return mNodeRegistry.at(name)->dataInputs(); }
inline auto dataInputs(const std::string name) const { return mNodeRegistry.at(name)->dataInputs(); }
/**
/** @todo here i am
* @brief List outside input connections of the GraphView. The vector
* @brief List outside input connections of the GraphView. The vector
* size is guaranteed to match the number of outside inputs of the GraphView. If there is
* size is guaranteed 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.
* no external connection to a given input, a pair of nullptr and gk_IODefaultIndex is returned.
@@ -250,7 +256,7 @@ public:
@@ -250,7 +256,7 @@ public:
/**
/**
* @brief List outside output connections of the GraphView. The vector
* @brief List outside output connections of the GraphView. The vector
* size is garanteed to match the number of outputs of the GraphView. If there is
* size is guaranteed to match the number of outputs of the GraphView. If there is
* no connection to a given output, the corresponding sub-vector will be empty.
* no connection to a given output, the corresponding sub-vector will be empty.
* @return std::vector<std::pair<NodePtr, IOIndex_t>>
* @return std::vector<std::pair<NodePtr, IOIndex_t>>
*/
*/
Loading