1 #ifndef _utl_TabulatedFunctionErrors_h_
2 #define _utl_TabulatedFunctionErrors_h_
13 #include <utl/TabulatedFunction.h>
29 const double borderTolerance = 1e-3)
33 const std::vector<double>& xValuesErr,
34 const std::vector<double>& yValues,
35 const std::vector<double>& yValuesErr,
36 const unsigned int interpolationOrder = 1,
37 const double borderTolerance = 1e-3) :
39 {
FillTable(xValues, xValuesErr,yValues, yValuesErr); }
46 void PushBack(
const double x,
const double xErr,
47 const double y,
const double yErr);
90 const
double&
GetXErr(const
unsigned int idx)
const {
return fXErr[idx]; }
91 const double&
GetYErr(
const unsigned int idx)
const {
return fYErr[idx]; }
97 const double x,
const double xErr,
98 const double y,
const double yErr);
115 void FillTable(
const std::vector<double>& xValues,
116 const std::vector<double>& xValuesErr,
117 const std::vector<double>& yValues,
118 const std::vector<double>& yValuesErr);
ArrayConstIterator YErrEnd() const
end of array of errors Y
void swap(utl::Trace< T > &t1, utl::Trace< T > &t2)
#define OFFLINE_MAKE_BOTH_ITERATOR_RANGES(_Iterator_, _ConstIterator_, _NamePrefix_)
#define OFFLINE_MAKE_BOTH_FRIEND_RANGES(_Iterator_, _ConstIterator_, _Class_)
Array::const_iterator ArrayConstIterator
double & GetYErr(const unsigned int idx)
TabulatedFunctionErrIterator IteratorErr
A pair of graph points (x,y) with errors.
Class to hold collection (x,y) points and provide interpolation between them.
friend void swap(utl::TabulatedFunctionErrors &t1, utl::TabulatedFunctionErrors &t2)
TabulatedFunctionErrors(const std::vector< double > &xValues, const std::vector< double > &xValuesErr, const std::vector< double > &yValues, const std::vector< double > &yValuesErr, const unsigned int interpolationOrder=1, const double borderTolerance=1e-3)
ArrayIterator XErrEnd()
end of array of errors X
ConstIteratorErr Begin() const
double & GetXErr(const unsigned int idx)
ConstTabulatedFunctionErrIterator ConstIteratorErr
std::vector< double > Array
const double & GetYErr(const unsigned int idx) const
PairErr operator[](const int idx) const
ArrayIterator XErrBegin()
begin of array of errors X
void PushBack(const double x, const double xErr, const double y, const double yErr)
const double & GetXErr(const unsigned int idx) const
ArrayConstIterator XErrEnd() const
end of array of errors X
ArrayIterator YErrBegin()
begin of array of errors Y
Array::iterator ArrayIterator
IteratorErr Insert(const IteratorErr &pos, const double x, const double xErr, const double y, const double yErr)
void Swap(TabulatedFunction &tf)
void FillTable(const std::vector< double > &xValues, const std::vector< double > &xValuesErr, const std::vector< double > &yValues, const std::vector< double > &yValuesErr)
ConstIteratorErr End() const
ArrayConstIterator XErrBegin() const
begin of array of errors X
ConstIteratorErr FindX(const double x) const
void Swap(TabulatedFunctionErrors &tf)
TabulatedFunctionErrors(const unsigned int interpolationOrder=1, const double borderTolerance=1e-3)
ConstIteratorErr FindY(const double y) const
ArrayIterator YErrEnd()
end of array of errors Y
ArrayConstIterator YErrBegin() const
begin of array of errors Y