FERS 1.0.0
The Flexible Extensible Radar Simulator
Loading...
Searching...
No Matches
interp::InterpSet Class Reference

Wrapper class for managing interpolation sets using smart pointers. More...

#include "interpolation_set.h"

Public Member Functions

constexpr InterpSet ()
 Constructs a new InterpSet object.
 
constexpr ~InterpSet ()=default
 
 InterpSet (const InterpSet &)=delete
 
InterpSetoperator= (const InterpSet &)=delete
 
 InterpSet (InterpSet &&)=delete
 
InterpSetoperator= (InterpSet &&)=delete
 
template<RealConcept T>
void insertSample (T x, T y) const noexcept
 Inserts a sample point into the interpolation set.
 
template<RealConcept T>
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.
 
template<RealConcept T>
void divide (T a) const
 Divides all y-values in the dataset by a given number.
 

Detailed Description

Wrapper class for managing interpolation sets using smart pointers.

Definition at line 81 of file interpolation_set.h.

Constructor & Destructor Documentation

◆ InterpSet() [1/3]

constexpr interp::InterpSet::InterpSet ( )
constexpr

Constructs a new InterpSet object.

Definition at line 87 of file interpolation_set.h.

87: _data(std::make_unique<InterpSetData>()) {}

◆ ~InterpSet()

constexpr interp::InterpSet::~InterpSet ( )
constexprdefault

◆ InterpSet() [2/3]

interp::InterpSet::InterpSet ( const InterpSet )
delete

◆ InterpSet() [3/3]

interp::InterpSet::InterpSet ( InterpSet &&  )
delete

Member Function Documentation

◆ divide()

template<RealConcept T>
void interp::InterpSet::divide ( a) const

Divides all y-values in the dataset by a given number.

Template Parameters
TThe type of the divisor (must be an arithmetic type).
Parameters
aThe divisor to divide all y-values by.
Exceptions
std::invalid_argumentThrown 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 ( x) const
noexcept

Retrieves the interpolated value at a given point.

Template Parameters
TThe type of the x-coordinate (must be an arithmetic type).
Parameters
xThe 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 ( x,
y 
) const
noexcept

Inserts a sample point into the interpolation set.

Template Parameters
TThe type of the x and y coordinates (must be an arithmetic type).
Parameters
xThe x-coordinate of the sample point.
yThe 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]

InterpSet & interp::InterpSet::operator= ( const InterpSet )
delete

◆ operator=() [2/2]

InterpSet & interp::InterpSet::operator= ( InterpSet &&  )
delete

The documentation for this class was generated from the following file: