summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/ipa/libipa/pwl.cpp6
-rw-r--r--src/ipa/libipa/pwl.h2
2 files changed, 8 insertions, 0 deletions
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
@@ -189,6 +189,12 @@ void Pwl::prepend(double x, double y, const double eps)
*/
/**
+ * \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
*/
diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h
index b4de00cf..02834231 100644
--- a/src/ipa/libipa/pwl.h
+++ b/src/ipa/libipa/pwl.h
@@ -52,6 +52,8 @@ public:
void append(double x, double y, double eps = 1e-6);
bool empty() const { return points_.empty(); }
+ size_t size() const { return points_.size(); }
+
Interval domain() const;
Interval range() const;