|
std::vector< double >
::const_iterator | _old |
|
|
enum | Style {
UNKNOWN = -1,
CONSTANT = 0,
LINEAR = 1,
NATURAL_SPLINE = 2,
CUBIC_SPLINE = 3,
CUBIC_SPLINE_PERIODIC = 4,
AKIMA_SPLINE = 5,
AKIMA_SPLINE_PERIODIC = 6,
NUM_STYLES
} |
|
| Interpolate (std::vector< double > const &x, std::vector< double > const &y, Interpolate::Style const style=UNKNOWN) |
|
| Interpolate (std::pair< std::vector< double >, std::vector< double > > const xy, Interpolate::Style const style=UNKNOWN) |
|
std::vector< double > const | _x |
|
std::vector< double > const | _y |
|
Interpolate::Style const | _style |
|
Definition at line 82 of file Interpolate.cc.
virtual lsst.afw.math::InterpolateConstant::~InterpolateConstant |
( |
| ) |
|
|
inlinevirtual |
lsst.afw.math::InterpolateConstant::InterpolateConstant |
( |
std::vector< double > const & |
x, |
|
|
std::vector< double > const & |
y, |
|
|
Interpolate::Style const |
style |
|
) |
| |
|
inlineprivate |
- Parameters
-
x | the x-values of points |
y | the values at x[] |
style | desired interpolator |
Definition at line 89 of file Interpolate.cc.
std::vector< double >::const_iterator _old
std::vector< double > const _x
Interpolate(std::vector< double > const &x, std::vector< double > const &y, Interpolate::Style const style=UNKNOWN)
double lsst.afw.math::InterpolateConstant::interpolate |
( |
double const |
x | ) |
const |
|
virtual |
Interpolate a constant to the point xInterp
.
Implements lsst.afw.math::Interpolate.
Definition at line 99 of file Interpolate.cc.
109 if (xInterp < *
_old) {
115 if (
_old <
_x.end() - 1 and xInterp < *(
_old + 1)) {
120 std::vector<double>::const_iterator low = std::upper_bound(
_old,
_x.end(), xInterp);
125 low = std::upper_bound(
_x.begin(), low + 1, xInterp);
130 if (low ==
_x.end()) {
131 return _y[
_y.size() - 1];
132 }
else if (low ==
_x.begin()) {
137 return _y[low -
_x.begin()];
std::vector< double > const _y
std::vector< double >::const_iterator _old
std::vector< double > const _x
boost::shared_ptr< Interpolate > makeInterpolate |
( |
std::vector< double > const & |
x, |
|
|
std::vector< double > const & |
y, |
|
|
Interpolate::Style const |
style |
|
) |
| |
|
friend |
A factory function to make Interpolate objects
std::vector<double>::const_iterator lsst.afw.math::InterpolateConstant::_old |
|
mutableprivate |
The documentation for this class was generated from the following file: