From be4955cdc6bb75db5f33ac7a2747bda57c0026ff Mon Sep 17 00:00:00 2001 From: Octave Perrin <operrin@lrtechnologies.fr> Date: Mon, 2 Dec 2024 09:16:34 +0100 Subject: [PATCH] continuation --- include/aidge/graph/GraphView.hpp | 20 +++++++++++++++----- 1 file changed, 15 insertions(+), 5 deletions(-) diff --git a/include/aidge/graph/GraphView.hpp b/include/aidge/graph/GraphView.hpp index f74e6cae1..2682d8c2a 100644 --- a/include/aidge/graph/GraphView.hpp +++ b/include/aidge/graph/GraphView.hpp @@ -183,10 +183,16 @@ public: /** @brief Get reference to the set of output Nodes. */ std::set<NodePtr> outputNodes() const; - /** @brief Assess if the given Node is an input Node of the GraphView object. */ + /** @brief Assess if the given Node is an input Node of the GraphView object. + * @param Node The tested Node + * @return bool True if the Node is an input of the GraphView, False otherwise + */ bool isInputNode(const NodePtr& nodePtr) const; - /** @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. + * @param Node The tested Node + * @return bool True if the Node is an output of the GraphView, False otherwise + */ bool isOutputNode(const NodePtr& nodePtr) const; /** @@ -229,6 +235,7 @@ public: * @return const std::vector<std::pair<NodePtr, IOIndex_t>>& */ inline const std::vector<std::pair<NodePtr, IOIndex_t>>& getOrderedInputs() const noexcept { return mInputNodes; }; + /** * @brief Get outputs of the current GraphView with their associated id. * The rank of the nodes are their rank in the vector. @@ -282,8 +289,8 @@ public: * @param nodeName Name of the Node of which to show the output. * @return std::vector<std::vector<std::pair<NodePtr, IOIndex_t>>> */ - std::vector<std::vector<std::pair<NodePtr, IOIndex_t>>> outputs( - const std::string& nodeName) const; + std::vector<std::vector<std::pair<NodePtr, IOIndex_t>>> outputs(const std::string& nodeName) const; + /** * @brief Assert Datatype, Backend, data format and dimensions along the GraphView are coherent. * If not, apply the required transformations. @@ -324,10 +331,12 @@ public: * @param DeviceIdx_t: device Backend device to be set */ void setBackend(const std::string& backend, const DeviceIdx_t device = 0) const; + /** @brief Set the same data type for each Operator of the GraphView object's Nodes. * @param DataType: datatype DataType to be set */ void setDataType(const DataType& datatype) const; + /** @brief Set the same data format for each Operator of the GraphView object's Nodes. * @param DataFormat: dataformat DataFormat to be set */ @@ -343,6 +352,7 @@ public: * @return std::set<NodePtr> */ std::set<NodePtr> getParents() const; + /** * @brief Get parents Nodes of the specified Node. * @param nodeName Name of the Node. @@ -373,7 +383,6 @@ public: */ std::vector<std::vector<NodePtr>> getChildren(const std::string nodeName) const; - /** * @brief Get children Nodes of the specified Node. * @param otherNode The Node @@ -704,6 +713,7 @@ private: * @return GraphView GraphView containing all nodes with a path to node. */ std::shared_ptr<GraphView> getConnectedGraphView(std::shared_ptr<Node> node); + } // namespace Aidge #endif /* AIDGE_CORE_GRAPH_GRAPHVIEW_H_ */ -- GitLab