Wrapper class for managing interpolation sets using smart pointers.
More...
#include "interpolation_set.h"
Wrapper class for managing interpolation sets using smart pointers.
Definition at line 81 of file interpolation_set.h.
◆ InterpSet() [1/3]
| constexpr interp::InterpSet::InterpSet |
( |
| ) |
|
|
constexpr |
◆ ~InterpSet()
| constexpr interp::InterpSet::~InterpSet |
( |
| ) |
|
|
constexprdefault |
◆ InterpSet() [2/3]
| interp::InterpSet::InterpSet |
( |
const InterpSet & |
| ) |
|
|
delete |
◆ InterpSet() [3/3]
| interp::InterpSet::InterpSet |
( |
InterpSet && |
| ) |
|
|
delete |
◆ divide()
template<RealConcept T>
| void interp::InterpSet::divide |
( |
T |
a | ) |
const |
Divides all y-values in the dataset by a given number.
- Template Parameters
-
| T | The type of the divisor (must be an arithmetic type). |
- Parameters
-
| a | The divisor to divide all y-values by. |
- Exceptions
-
| std::invalid_argument | Thrown if the divisor is zero. |
Definition at line 137 of file interpolation_set.h.
138 {
139 _data->divide(a);
140 }
◆ getMax()
| double interp::InterpSet::getMax |
( |
| ) |
const |
|
noexcept |
Retrieves the maximum absolute value in the interpolation set.
- Returns
- The maximum absolute y-value in the dataset, or 0.0 if the set is empty.
Definition at line 127 of file interpolation_set.h.
127{ return _data->max(); }
◆ getValueAt()
template<RealConcept T>
| std::optional< T > interp::InterpSet::getValueAt |
( |
T |
x | ) |
const |
|
noexcept |
Retrieves the interpolated value at a given point.
- Template Parameters
-
| T | The type of the x-coordinate (must be an arithmetic type). |
- Parameters
-
| x | The x-coordinate at which to interpolate the value. |
- Returns
- The interpolated value at the given x-coordinate, or std::nullopt if the dataset is empty.
Definition at line 117 of file interpolation_set.h.
118 {
119 return _data->value(x);
120 }
◆ insertSample()
template<RealConcept T>
| void interp::InterpSet::insertSample |
( |
T |
x, |
|
|
T |
y |
|
) |
| const |
|
noexcept |
Inserts a sample point into the interpolation set.
- Template Parameters
-
| T | The type of the x and y coordinates (must be an arithmetic type). |
- Parameters
-
| x | The x-coordinate of the sample point. |
| y | The y-coordinate of the sample point. |
Definition at line 104 of file interpolation_set.h.
105 {
106 _data->insertSample(x, y);
107 }
◆ operator=() [1/2]
◆ operator=() [2/2]
The documentation for this class was generated from the following file: