#include <Spline.h>
|
virtual | ~Spline () |
|
void | interpolate (std::vector< double > const &x, std::vector< double > &y) const |
|
void | derivative (std::vector< double > const &x, std::vector< double > &dydx) const |
|
std::vector< double > | roots (double const value, double const x0, double const x1) const |
|
|
std::vector< double > | _knots |
|
std::vector< std::vector
< double > > | _coeffs |
|
Definition at line 12 of file Spline.h.
virtual lsst.afw.math.detail::Spline::~Spline |
( |
| ) |
|
|
inlinevirtual |
lsst.afw.math.detail::Spline::Spline |
( |
| ) |
|
|
inlineprotected |
void lsst.afw.math.detail::Spline::_allocateSpline |
( |
int const |
nknot | ) |
|
|
protected |
Definition at line 25 of file Spline.cc.
29 for (
unsigned int i = 0; i !=
_coeffs.size(); ++i) {
std::vector< std::vector< double > > _coeffs
std::vector< double > _knots
void lsst.afw.math.detail::Spline::derivative |
( |
std::vector< double > const & |
x, |
|
|
std::vector< double > & |
dydx |
|
) |
| const |
Find the derivative of a Spline.
- Parameters
-
x | points to evaluate derivative at |
dydx | derivatives at x |
Definition at line 73 of file Spline.cc.
77 int const nknot =
_knots.size();
78 int const n = x.size();
91 for (
int i = 0; i != n; ++i) {
92 ind = search_array(x[i], &
_knots[0], nknot, ind);
96 }
else if(ind >= nknot) {
100 double const dx = x[i] -
_knots[ind];
std::vector< std::vector< double > > _coeffs
std::vector< double > _knots
void lsst.afw.math.detail::Spline::interpolate |
( |
std::vector< double > const & |
x, |
|
|
std::vector< double > & |
y |
|
) |
| const |
Interpolate a Spline.
- Parameters
-
x | points to interpolate at |
y | interpolated values at x |
Definition at line 38 of file Spline.cc.
42 int const nknot =
_knots.size();
43 int const n = x.size();
54 for (
int i = 0; i != n; ++i) {
55 ind = search_array(x[i], &
_knots[0], nknot, ind);
59 }
else if(ind >= nknot) {
63 double const dx = x[i] -
_knots[ind];
std::vector< std::vector< double > > _coeffs
std::vector< double > _knots
std::vector< double > lsst.afw.math.detail::Spline::roots |
( |
double const |
value, |
|
|
double const |
x0, |
|
|
double const |
x1 |
|
) |
| const |
- Parameters
-
value | desired value |
x0 | specify desired range is [x0,x1) |
x1 | specify desired range is [x0,x1) |
Definition at line 1472 of file Spline.cc.
1484 std::vector<double>
roots;
1486 double const x1 =
b;
1487 int const nknot =
_knots.size();
1489 int i0 = search_array(x0, &
_knots[0], nknot, -1);
1490 int const i1 = search_array(x1, &
_knots[0], nknot, i0);
1491 assert (i1 >= i0 && i1 <= nknot - 1);
1493 std::vector<double> newRoots;
1507 for (
unsigned int j = 0; j != newRoots.size(); ++j) {
1508 newRoots[j] +=
_knots[i0];
1510 keep_valid_roots(roots, newRoots, x0,
_knots[i0]);
1513 }
else if(i0 >= nknot) {
1518 for (
unsigned int j = 0; j != newRoots.size(); ++j) {
1519 newRoots[j] +=
_knots[i0];
1521 keep_valid_roots(roots, newRoots, x0, x1);
1529 for (
int i = i0;i <= i1;i++) {
1532 for (
unsigned int j = 0; j != newRoots.size(); ++j) {
1533 newRoots[j] +=
_knots[i];
1535 keep_valid_roots(roots, newRoots, ((i == i0) ? x0 :
_knots[i]), ((i == i1) ? x1 :
_knots[i + 1]));
std::vector< std::vector< double > > _coeffs
std::vector< double > roots(double const value, double const x0, double const x1) const
std::vector< double > _knots
afw::table::Key< double > b
std::vector<std::vector<double> > lsst.afw.math.detail::Spline::_coeffs |
|
protected |
std::vector<double> lsst.afw.math.detail::Spline::_knots |
|
protected |
The documentation for this class was generated from the following files:
- /home/lsstsw/stack/Linux64/afw/11.0.rc2+4/include/lsst/afw/math/detail/Spline.h
- /home/lsstsw/stack/Linux64/afw/11.0.rc2+4/src/math/Spline.cc