From 0706c67711839c88accaf577ac27f7473137febe Mon Sep 17 00:00:00 2001 From: Laurent Pinchart Date: Thu, 13 Jun 2024 03:21:46 +0300 Subject: ipa: libipa: pwl: Add a size() function Add a size() function to the Pwl class to return the number of points in the piecewise linear function. This is useful, for instance, to validate that all points added with append() or prepend() have been taken into account. Signed-off-by: Laurent Pinchart Reviewed-by: Paul Elder Reviewed-by: Kieran Bingham --- src/ipa/libipa/pwl.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/ipa/libipa/pwl.cpp') diff --git a/src/ipa/libipa/pwl.cpp b/src/ipa/libipa/pwl.cpp index d8ea92be..8b437dd1 100644 --- a/src/ipa/libipa/pwl.cpp +++ b/src/ipa/libipa/pwl.cpp @@ -188,6 +188,12 @@ void Pwl::prepend(double x, double y, const double eps) * \return True if there are no points in the function, false otherwise */ +/** + * \fn Pwl::size() const + * \brief Retrieve the number of points in the piecewise linear function + * \return The number of points in the piecewise linear function + */ + /** * \brief Get the domain of the piecewise linear function * \return An interval representing the domain -- cgit v1.2.1