29#ifndef mx_math_logInterpolator_hpp
30#define mx_math_logInterpolator_hpp
53template <
typename interpT>
58 typedef typename interpT::realT realT;
77 const std::vector<realT> &y
88 void setup(
const std::vector<realT> &x,
89 const std::vector<realT> &y
92 if( x.size() != y.size() )
100 for(
size_t n = 0; n < x.size(); ++n )
112 m_logx[n] = std::log10( x[n] );
113 m_logy[n] = std::log10( y[n] );
125 return std::pow(
static_cast<realT
>( 10 ),
m_interp( std::log10( x ) ) );
Augments an exception with the source file and line.
Class to manage interpolation using the GSL interpolation library.
logInterpolator()
Default constructor.
std::vector< realT > m_logx
Internal storage of the log10 values of the x values.
gslInterpolator< interpT > m_interp
The interpolator.
logInterpolator(const std::vector< realT > &x, const std::vector< realT > &y)
Convert the inputs to their log10 values, and construct the interpolator.
realT operator()(const realT &x)
Calculate the interpolated value at the input.
void setup(const std::vector< realT > &x, const std::vector< realT > &y)
Convert the inputs to their log10 values, and construct the interpolator.
std::vector< realT > m_logy
Internal storage of the lgo10 values of the y values.
@ sizeerr
A size was invalid or calculated incorrectly.
@ invalidarg
An argument was invalid.
Class for managing 1-D interpolation using the GNU Scientific Library.
Declarations of some libarary wide utilities.