add accessors and equality operator to Tabulated1DFunction
This commit is contained in:
@@ -225,6 +225,12 @@ public:
|
|||||||
Scalar xAt(size_t i) const
|
Scalar xAt(size_t i) const
|
||||||
{ return xValues_[i]; }
|
{ return xValues_[i]; }
|
||||||
|
|
||||||
|
const std::vector<Scalar>& xValues() const
|
||||||
|
{ return xValues_; }
|
||||||
|
|
||||||
|
const std::vector<Scalar>& yValues() const
|
||||||
|
{ return yValues_; }
|
||||||
|
|
||||||
/*!
|
/*!
|
||||||
* \brief Return the value of the a sample point with a given index.
|
* \brief Return the value of the a sample point with a given index.
|
||||||
*/
|
*/
|
||||||
@@ -437,6 +443,11 @@ public:
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
bool operator==(const Tabulated1DFunction<Scalar>& data) const {
|
||||||
|
return xValues_ == data.xValues_ &&
|
||||||
|
yValues_ == data.yValues_;
|
||||||
|
}
|
||||||
|
|
||||||
private:
|
private:
|
||||||
template <class Evaluation>
|
template <class Evaluation>
|
||||||
size_t findSegmentIndex_(const Evaluation& x, bool extrapolate = false) const
|
size_t findSegmentIndex_(const Evaluation& x, bool extrapolate = false) const
|
||||||
|
|||||||
Reference in New Issue
Block a user