LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0-2-g04d2804
include
lsst
afw
math
detail
Spline.h
Go to the documentation of this file.
1
#if !defined(LSST_AFW_MATH_DETAIL_SPLINE)
2
#define LSST_AFW_MATH_DETAIL_SPLINE 1
3
#include <cmath>
4
#include <vector>
5
6
namespace
lsst {
namespace
afw {
namespace
math {
namespace
detail {
7
8
/*****************************************************************************/
9
/*
10
* Splines
11
*/
12
class
Spline
{
13
public
:
14
virtual
~Spline
() {}
15
16
void
interpolate
(std::vector<double>
const
&
x
,
17
std::vector<double> &
y
18
)
const
;
19
void
derivative
(std::vector<double>
const
&
x
,
20
std::vector<double> &dydx
21
)
const
;
22
23
std::vector<double>
roots
(
double
const
value,
24
double
const
x0
,
25
double
const
x1
26
)
const
;
27
28
protected
:
29
Spline
() {}
30
void
_allocateSpline
(
int
const
nknot);
31
32
std::vector<double>
_knots
;
// positions of knots
33
std::vector<std::vector<double> >
_coeffs
;
// and associated coefficients
34
};
35
36
class
TautSpline
:
public
Spline
{
37
public
:
38
enum
Symmetry
{
Unknown
,
Odd
,
Even
};
39
40
TautSpline
(std::vector<double>
const
&
x
,
41
std::vector<double>
const
&
y
,
42
double
const
gamma=0,
43
Symmetry
type=
Unknown
44
);
45
private
:
46
void
calculateTautSpline
(std::vector<double>
const
&
x
,
47
std::vector<double>
const
&
y
,
48
double
const
gamma0
49
);
50
void
calculateTautSplineEvenOdd
(std::vector<double>
const
&
x
,
51
std::vector<double>
const
&
y
,
52
double
const
gamma0,
53
bool
even
54
);
55
};
56
57
class
SmoothedSpline
:
public
Spline
{
58
public
:
59
SmoothedSpline
(std::vector<double>
const
&
x
,
60
std::vector<double>
const
&
y
,
61
std::vector<double>
const
& dy,
62
double
s,
63
double
*
chisq
=NULL,
64
std::vector<double> *errs=NULL
65
);
66
};
67
}}}}
68
#endif
y
int y
Definition:
GaussianCentroid.cc:36
lsst::afw::math::detail::TautSpline::calculateTautSpline
void calculateTautSpline(std::vector< double > const &x, std::vector< double > const &y, double const gamma0)
Definition:
Spline.cc:213
lsst::afw::math::detail::TautSpline::calculateTautSplineEvenOdd
void calculateTautSplineEvenOdd(std::vector< double > const &x, std::vector< double > const &y, double const gamma0, bool even)
Definition:
Spline.cc:1199
lsst::afw::math::detail::Spline::~Spline
virtual ~Spline()
Definition:
Spline.h:14
lsst::afw::math::detail::Spline::_coeffs
std::vector< std::vector< double > > _coeffs
Definition:
Spline.h:33
lsst::afw::math::detail::Spline::derivative
void derivative(std::vector< double > const &x, std::vector< double > &dydx) const
Definition:
Spline.cc:73
lsst::afw::math::detail::Spline
Definition:
Spline.h:12
lsst::afw::math::detail::Spline::_knots
std::vector< double > _knots
Definition:
Spline.h:32
lsst::afw.display::x0
int const x0
Definition:
saturated.cc:45
lsst::afw::math::detail::SmoothedSpline::SmoothedSpline
SmoothedSpline(std::vector< double > const &x, std::vector< double > const &y, std::vector< double > const &dy, double s, double *chisq=NULL, std::vector< double > *errs=NULL)
Definition:
Spline.cc:710
lsst::afw::math::detail::Spline::interpolate
void interpolate(std::vector< double > const &x, std::vector< double > &y) const
Definition:
Spline.cc:38
lsst::afw::math::detail::Spline::Spline
Spline()
Definition:
Spline.h:29
lsst::afw::math::detail::Spline::roots
std::vector< double > roots(double const value, double const x0, double const x1) const
Definition:
Spline.cc:1472
lsst::afw::math::detail::TautSpline::Odd
Definition:
Spline.h:38
x
double x
Definition:
ChebyshevBoundedField.cc:305
lsst::afw::math::detail::TautSpline
Definition:
Spline.h:36
lsst::afw::math::detail::Spline::_allocateSpline
void _allocateSpline(int const nknot)
Definition:
Spline.cc:25
chisq
double chisq
Definition:
GaussianCentroid.cc:86
lsst::afw::math::detail::TautSpline::Unknown
Definition:
Spline.h:38
lsst::afw::math::detail::SmoothedSpline
Definition:
Spline.h:57
lsst::afw::math::detail::TautSpline::Even
Definition:
Spline.h:38
lsst::afw::math::detail::TautSpline::Symmetry
Symmetry
Definition:
Spline.h:38
lsst::afw::math::detail::TautSpline::TautSpline
TautSpline(std::vector< double > const &x, std::vector< double > const &y, double const gamma=0, Symmetry type=Unknown)
Definition:
Spline.cc:178
Generated on Thu Sep 24 2015 02:29:15 for LSSTApplications by
1.8.5