40 template <RealConcept T>
53 template <RealConcept T>
54 [[nodiscard]] std::optional<T>
value(T x)
const noexcept;
61 [[nodiscard]]
double max() const noexcept;
103 template <RealConcept T>
106 _data->insertSample(x, y);
116 template <RealConcept T>
117 [[nodiscard]] std::optional<T>
getValueAt(T x)
const noexcept
119 return _data->value(x);
127 [[nodiscard]]
double getMax() const noexcept {
return _data->max(); }
136 template <RealConcept T>
143 std::unique_ptr<InterpSetData> _data;
Class for managing a set of data and performing interpolation.
double max() const noexcept
Retrieves the maximum absolute value in the interpolation set.
void divide(T a)
Divides all y-values in the dataset by a given number.
void insertSample(T x, T y) noexcept
Inserts a sample point into the interpolation set.
std::optional< T > value(T x) const noexcept
Retrieves the interpolated value at a given point.
Wrapper class for managing interpolation sets using smart pointers.
constexpr InterpSet()
Constructs a new InterpSet object.
void divide(T a) const
Divides all y-values in the dataset by a given number.
constexpr ~InterpSet()=default
std::optional< T > getValueAt(T x) const noexcept
Retrieves the interpolated value at a given point.
double getMax() const noexcept
Retrieves the maximum absolute value in the interpolation set.
InterpSet & operator=(const InterpSet &)=delete
InterpSet(const InterpSet &)=delete
InterpSet & operator=(InterpSet &&)=delete
void insertSample(T x, T y) const noexcept
Inserts a sample point into the interpolation set.
InterpSet(InterpSet &&)=delete
Global configuration file for the project.
double RealType
Type for real numbers.