LSSTApplications
10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Main Page
Related Pages
Modules
Namespaces
Classes
Files
Examples
File List
File Members
home
lsstsw
stack
Linux64
afw
11.0.rc2+4
include
lsst
afw
math
Interpolate.h
Go to the documentation of this file.
1
// -*- LSST-C++ -*-
2
#if !defined(LSST_AFW_MATH_INTERPOLATE_H)
3
#define LSST_AFW_MATH_INTERPOLATE_H
4
5
/*
6
* LSST Data Management System
7
* Copyright 2008, 2009, 2010 LSST Corporation.
8
*
9
* This product includes software developed by the
10
* LSST Project (http://www.lsst.org/).
11
*
12
* This program is free software: you can redistribute it and/or modify
13
* it under the terms of the GNU General Public License as published by
14
* the Free Software Foundation, either version 3 of the License, or
15
* (at your option) any later version.
16
*
17
* This program is distributed in the hope that it will be useful,
18
* but WITHOUT ANY WARRANTY; without even the implied warranty of
19
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
20
* GNU General Public License for more details.
21
*
22
* You should have received a copy of the LSST License Statement and
23
* the GNU General Public License along with this program. If not,
24
* see <http://www.lsstcorp.org/LegalNotices/>.
25
*/
26
#include "
lsst/base.h
"
27
28
namespace
lsst {
29
namespace
afw {
30
namespace
math {
31
37
class
Interpolate
{
38
public
:
39
enum
Style
{
40
UNKNOWN
= -1,
41
CONSTANT
= 0,
42
LINEAR
= 1,
43
NATURAL_SPLINE
= 2,
44
CUBIC_SPLINE
= 3,
45
CUBIC_SPLINE_PERIODIC
= 4,
46
AKIMA_SPLINE
= 5,
47
AKIMA_SPLINE_PERIODIC
= 6,
48
NUM_STYLES
49
};
50
51
friend
PTR
(
Interpolate
)
makeInterpolate
(std::vector<
double
> const &
x
, std::vector<
double
> const &
y
,
52
Interpolate
::
Style
const style);
53
54
virtual ~
Interpolate
() {}
55
virtual
double
interpolate
(
double
const
x
)
const
= 0;
56
protected
:
60
Interpolate
(std::vector<double>
const
&
x
,
61
std::vector<double>
const
&
y
,
62
Interpolate::Style
const
style=
UNKNOWN
63
) :
_x
(x),
_y
(y),
_style
(style) {}
64
Interpolate
(std::pair<std::vector<double>, std::vector<double> >
const
xy,
65
Interpolate::Style
const
style=
UNKNOWN
);
66
67
std::vector<double>
const
_x
;
68
std::vector<double>
const
_y
;
69
Interpolate::Style
const
_style
;
70
private
:
71
Interpolate
(
Interpolate
const
&);
72
Interpolate
&
operator=
(
Interpolate
const
&);
73
};
74
75
PTR
(
Interpolate
)
makeInterpolate
(std::vector<
double
> const &
x
, std::vector<
double
> const &
y
,
76
Interpolate
::Style const style=
Interpolate
::AKIMA_SPLINE);
77
78
Interpolate
::Style
stringToInterpStyle
(std::
string
const &style);
79
Interpolate
::Style
lookupMaxInterpStyle
(
int
const n);
80
int
lookupMinInterpPoints
(
Interpolate
::Style const style);
81
82
}}}
83
84
#endif // LSST_AFW_MATH_INTERPOLATE_H
y
int y
Definition:
GaussianCentroid.cc:36
lsst.afw.math::Interpolate::makeInterpolate
friend boost::shared_ptr< Interpolate > makeInterpolate(std::vector< double > const &x, std::vector< double > const &y, Interpolate::Style const style)
lsst.afw.math::stringToInterpStyle
Interpolate::Style stringToInterpStyle(std::string const &style)
Conversion function to switch a string to an Interpolate::Style.
Definition:
Interpolate.cc:262
lsst.afw.math::Interpolate
Interpolate values for a set of x,y vector<>s.
Definition:
Interpolate.h:37
PTR
#define PTR(...)
Definition:
base.h:41
lsst.afw.math::Interpolate::AKIMA_SPLINE
Definition:
Interpolate.h:46
lsst.afw.math::Interpolate::_y
std::vector< double > const _y
Definition:
Interpolate.h:68
lsst.afw.math::Interpolate::LINEAR
Definition:
Interpolate.h:42
lsst.afw.math::makeInterpolate
boost::shared_ptr< Interpolate > makeInterpolate(std::vector< double > const &x, std::vector< double > const &y, Interpolate::Style const style=Interpolate::AKIMA_SPLINE)
Definition:
Interpolate.cc:353
lsst.afw.math::Interpolate::_x
std::vector< double > const _x
Definition:
Interpolate.h:67
lsst.afw.math::Interpolate::CUBIC_SPLINE_PERIODIC
Definition:
Interpolate.h:45
lsst.afw.math::Interpolate::CONSTANT
Definition:
Interpolate.h:41
lsst.afw.math::Interpolate::Style
Style
Definition:
Interpolate.h:39
lsst.afw.math::Interpolate::UNKNOWN
Definition:
Interpolate.h:40
lsst.afw.math::Interpolate::NATURAL_SPLINE
Definition:
Interpolate.h:43
lsst.afw.math::lookupMaxInterpStyle
Interpolate::Style lookupMaxInterpStyle(int const n)
Get the highest order Interpolation::Style available for 'n' points.
Definition:
Interpolate.cc:285
x
int x
Definition:
GaussianCentroid.cc:36
lsst.afw.math::Interpolate::operator=
Interpolate & operator=(Interpolate const &)
lsst.afw.math::lookupMinInterpPoints
int lookupMinInterpPoints(Interpolate::Style const style)
Get the minimum number of points needed to use the requested interpolation style. ...
Definition:
Interpolate.cc:309
base.h
lsst.afw.math::Interpolate::_style
Interpolate::Style const _style
Definition:
Interpolate.h:69
lsst.afw.math::Interpolate::CUBIC_SPLINE
Definition:
Interpolate.h:44
lsst.afw.math::Interpolate::interpolate
virtual double interpolate(double const x) const =0
lsst.afw.math::Interpolate::AKIMA_SPLINE_PERIODIC
Definition:
Interpolate.h:47
lsst.afw.math::Interpolate::Interpolate
Interpolate(std::vector< double > const &x, std::vector< double > const &y, Interpolate::Style const style=UNKNOWN)
Definition:
Interpolate.h:60
lsst.afw.math::Interpolate::NUM_STYLES
Definition:
Interpolate.h:48
Generated on Wed Sep 16 2015 13:35:25 for LSSTApplications by
1.8.5