From 3acacb089dbe8aa26b8085591bad10e317f3de1a Mon Sep 17 00:00:00 2001 From: Stefan Klug Date: Thu, 23 Jan 2025 12:40:52 +0100 Subject: libipa: pwl: Add clear() function Sometimes it is necessary to clear a pwl. Add a function for that. Signed-off-by: Stefan Klug Reviewed-by: Paul Elder Reviewed-by: Daniel Scally --- src/ipa/libipa/pwl.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/ipa/libipa/pwl.h') diff --git a/src/ipa/libipa/pwl.h b/src/ipa/libipa/pwl.h index 8fdc7053..c1496c30 100644 --- a/src/ipa/libipa/pwl.h +++ b/src/ipa/libipa/pwl.h @@ -49,6 +49,7 @@ public: void append(double x, double y, double eps = 1e-6); bool empty() const { return points_.empty(); } + void clear() { points_.clear(); } size_t size() const { return points_.size(); } Interval domain() const; -- cgit v1.2.1