From f43fb81d8bda4ce9dd0b85cca4a652db5d181c2f Mon Sep 17 00:00:00 2001 From: thibault allenet <thibault.allenet@cea.fr> Date: Thu, 22 Feb 2024 16:28:23 +0000 Subject: [PATCH] Update comments in dataProvider.hpp --- include/aidge/data/DataProvider.hpp | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/include/aidge/data/DataProvider.hpp b/include/aidge/data/DataProvider.hpp index 43245573c..62d10a698 100644 --- a/include/aidge/data/DataProvider.hpp +++ b/include/aidge/data/DataProvider.hpp @@ -77,7 +77,7 @@ public: std::vector<std::shared_ptr<Tensor>> readBatch() const; /** - * @brief Get the Number of Batch + * @brief Get the Number of Batch. * * @return std::size_t */ @@ -86,7 +86,7 @@ public: }; /** - * @brief Get the current Index Batch + * @brief Get the current Index Batch. * * @return std::size_t */ @@ -108,10 +108,13 @@ public: ++mIndexBatch; }; + /** + * @brief Setup the batches for one pass on the database. + */ void setBatches(); /** - * @brief End of dataProvider condition + * @brief End condition of dataProvider for one pass on the database. * * @return true when all batch were fetched, False otherwise */ @@ -119,10 +122,20 @@ public: return (mIndexBatch == mNbBatch); }; + // Functions for python iterator iter and next (definition in pybind.cpp) - // __iter__ method for iterator protocol + /** + * @brief __iter__ method for iterator protocol + * + * @return DataProvider* + */ DataProvider* iter(); - // __next__ method for iterator protocol + + /** + * @brief __next__ method for iterator protocol + * + * @return std::vector<std::shared_ptr<Aidge::Tensor>> + */ std::vector<std::shared_ptr<Aidge::Tensor>> next(); }; -- GitLab