Changeset 1647
- Timestamp:
- Dec 13, 2008, 9:45:44 AM (14 years ago)
- Location:
- trunk/yat/regression
- Files:
-
- 1 edited
- 8 copied
Legend:
- Unmodified
- Added
- Removed
-
trunk/yat/regression/AkimaInterpolation.cc
r1646 r1647 20 20 */ 21 21 22 #include " LinearInterpolation.h"22 #include "AkimaInterpolation.h" 23 23 24 24 #include <gsl/gsl_interp.h> … … 29 29 30 30 31 LinearInterpolation::LinearInterpolation(const utility::VectorBase& x,32 33 : GSLInterpolation(gsl_interp_ linear,x,y)31 AkimaInterpolation::AkimaInterpolation(const utility::VectorBase& x, 32 const utility::VectorBase& y) 33 : GSLInterpolation(gsl_interp_akima,x,y) 34 34 { 35 35 } 36 36 37 37 38 LinearInterpolation::~LinearInterpolation(void)38 AkimaInterpolation::~AkimaInterpolation(void) 39 39 { 40 40 } -
trunk/yat/regression/AkimaInterpolation.h
r1646 r1647 1 #ifndef _theplu_yat_regression_ linear_interpolation_2 #define _theplu_yat_regression_ linear_interpolation_1 #ifndef _theplu_yat_regression_akima_interpolation_ 2 #define _theplu_yat_regression_akima_interpolation_ 3 3 4 4 // $Id$ … … 33 33 34 34 /** 35 \brief Linear interpolation. 35 \brief Non-rounded Akima spline with natural boundary conditions. 36 37 This method uses the non-rounded corner algorithm of Wodicka. 36 38 37 39 \see Please refer to the base class documentation for genereal 38 40 introduction to the GSL based interpolation methods. 39 41 */ 40 class LinearInterpolation : public GSLInterpolation42 class AkimaInterpolation : public GSLInterpolation 41 43 { 42 44 … … 45 47 \brief The default constructor 46 48 */ 47 LinearInterpolation(const utility::VectorBase& x,48 49 AkimaInterpolation(const utility::VectorBase& x, 50 const utility::VectorBase& y); 49 51 50 52 /** 51 53 \brief The destructor 52 54 */ 53 ~ LinearInterpolation(void);55 ~AkimaInterpolation(void); 54 56 55 57 private: … … 57 59 \brief Copy Constructor. (not implemented) 58 60 */ 59 LinearInterpolation(const LinearInterpolation&);61 AkimaInterpolation(const AkimaInterpolation&); 60 62 61 63 }; -
trunk/yat/regression/AkimaPeriodicInterpolation.cc
r1646 r1647 20 20 */ 21 21 22 #include " LinearInterpolation.h"22 #include "AkimaPeriodicInterpolation.h" 23 23 24 24 #include <gsl/gsl_interp.h> … … 29 29 30 30 31 LinearInterpolation::LinearInterpolation(const utility::VectorBase& x,32 31 AkimaPeriodicInterpolation::AkimaPeriodicInterpolation( 32 const utility::VectorBase& x, const utility::VectorBase& y) 33 33 : GSLInterpolation(gsl_interp_linear,x,y) 34 34 { … … 36 36 37 37 38 LinearInterpolation::~LinearInterpolation(void)38 AkimaPeriodicInterpolation::~AkimaPeriodicInterpolation(void) 39 39 { 40 40 } -
trunk/yat/regression/AkimaPeriodicInterpolation.h
r1646 r1647 1 #ifndef _theplu_yat_regression_ linear_interpolation_2 #define _theplu_yat_regression_ linear_interpolation_1 #ifndef _theplu_yat_regression_akima_periodic_interpolation_ 2 #define _theplu_yat_regression_akima_periodic_interpolation_ 3 3 4 4 // $Id$ … … 33 33 34 34 /** 35 \brief Linearinterpolation.35 \brief AkimaPeriodic interpolation. 36 36 37 37 \see Please refer to the base class documentation for genereal 38 38 introduction to the GSL based interpolation methods. 39 39 */ 40 class LinearInterpolation : public GSLInterpolation40 class AkimaPeriodicInterpolation : public GSLInterpolation 41 41 { 42 42 … … 45 45 \brief The default constructor 46 46 */ 47 LinearInterpolation(const utility::VectorBase& x,48 const utility::VectorBase& y);47 AkimaPeriodicInterpolation(const utility::VectorBase& x, 48 const utility::VectorBase& y); 49 49 50 50 /** 51 51 \brief The destructor 52 52 */ 53 ~ LinearInterpolation(void);53 ~AkimaPeriodicInterpolation(void); 54 54 55 55 private: … … 57 57 \brief Copy Constructor. (not implemented) 58 58 */ 59 LinearInterpolation(const LinearInterpolation&);59 AkimaPeriodicInterpolation(const AkimaPeriodicInterpolation&); 60 60 61 61 }; -
trunk/yat/regression/CSplinePeriodicInterpolation.cc
r1645 r1647 20 20 */ 21 21 22 #include "CSpline Interpolation.h"22 #include "CSplinePeriodicInterpolation.h" 23 23 24 24 #include <gsl/gsl_interp.h> … … 29 29 30 30 31 CSpline Interpolation::CSplineInterpolation(const utility::VectorBase& x,32 31 CSplinePeriodicInterpolation::CSplinePeriodicInterpolation( 32 const utility::VectorBase& x, const utility::VectorBase& y) 33 33 : GSLInterpolation(gsl_interp_cspline,x,y) 34 34 { … … 36 36 37 37 38 CSpline Interpolation::~CSplineInterpolation(void)38 CSplinePeriodicInterpolation::~CSplinePeriodicInterpolation(void) 39 39 { 40 40 } -
trunk/yat/regression/CSplinePeriodicInterpolation.h
r1645 r1647 1 #ifndef _theplu_yat_regression_cspline_ interpolation_2 #define _theplu_yat_regression_cspline_ interpolation_1 #ifndef _theplu_yat_regression_cspline_periodic_interpolation_ 2 #define _theplu_yat_regression_cspline_periodic_interpolation_ 3 3 4 4 // $Id$ … … 33 33 34 34 /** 35 \brief Cubic spline with naturalboundary conditions.35 \brief Cubic spline with periodic boundary conditions. 36 36 37 37 The resulting curve is piecewise cubic on each interval, with 38 38 matching first and second derivatives at the supplied 39 data-points. The second derivative is chosen to be zero at the 40 first point and last point. 39 data-points. The derivatives at the first and last points are 40 also matched. Note that the last point in the data must have the 41 same y-value as the first point, otherwise the resulting periodic 42 interpolation will have a discontinuity at the boundary. 41 43 42 44 \see Please refer to the base class documentation for genereal 43 45 introduction to the GSL based interpolation methods. 44 46 */ 45 class CSpline Interpolation : public GSLInterpolation47 class CSplinePeriodicInterpolation : public GSLInterpolation 46 48 { 47 49 … … 50 52 \brief The default constructor 51 53 */ 52 CSpline Interpolation(const utility::VectorBase& x,53 const utility::VectorBase& y);54 CSplinePeriodicInterpolation(const utility::VectorBase& x, 55 const utility::VectorBase& y); 54 56 55 57 /** 56 58 \brief The destructor 57 59 */ 58 ~CSpline Interpolation(void);60 ~CSplinePeriodicInterpolation(void); 59 61 60 62 private: … … 62 64 \brief Copy Constructor. (not implemented) 63 65 */ 64 CSpline Interpolation(const CSplineInterpolation&);66 CSplinePeriodicInterpolation(const CSplinePeriodicInterpolation&); 65 67 66 68 }; -
trunk/yat/regression/Makefile.am
r1646 r1647 23 23 24 24 noinst_LTLIBRARIES = libregression.la 25 libregression_la_SOURCES = CSplineInterpolation.cc GSLInterpolation.cc \ 26 KernelBox.cc KernelTriCube.cc Linear.cc LinearInterpolation.cc \ 27 LinearWeighted.cc Local.cc MultiDimensional.cc \ 28 MultiDimensionalWeighted.cc Naive.cc NaiveWeighted.cc \ 29 OneDimensional.cc OneDimensionalWeighted.cc Polynomial.cc \ 30 PolynomialWeighted.cc 25 libregression_la_SOURCES = AkimaInterpolation.cc \ 26 AkimaPeriodicInterpolation.cc CSplineInterpolation.cc \ 27 CSplinePeriodicInterpolation.cc GSLInterpolation.cc KernelBox.cc \ 28 KernelTriCube.cc Linear.cc LinearInterpolation.cc LinearWeighted.cc \ 29 Local.cc MultiDimensional.cc MultiDimensionalWeighted.cc Naive.cc \ 30 NaiveWeighted.cc OneDimensional.cc OneDimensionalWeighted.cc \ 31 Polynomial.cc LinearInterpolation.cc PolynomialWeighted.cc 31 32 32 33 include_regressiondir = $(includedir)/yat/regression 33 34 34 include_regression_HEADERS = CSplineInterpolation.h GSLInterpolation.h \ 35 Kernel.h KernelBox.h KernelTriCube.h \ 36 Linear.h LinearInterpolation.h LinearWeighted.h Local.h MultiDimensional.h \ 37 MultiDimensionalWeighted.h Naive.h NaiveWeighted.h \ 38 OneDimensional.h OneDimensionalWeighted.h Polynomial.h \ 35 include_regression_HEADERS = AkimaInterpolation.h \ 36 AkimaPeriodicInterpolation.h CSplineInterpolation.h \ 37 CSplinePeriodicInterpolation.cc GSLInterpolation.h Kernel.h \ 38 KernelBox.h KernelTriCube.h Linear.h LinearInterpolation.h \ 39 LinearWeighted.h Local.h MultiDimensional.h \ 40 MultiDimensionalWeighted.h Naive.h NaiveWeighted.h OneDimensional.h \ 41 OneDimensionalWeighted.h Polynomial.h LinearInterpolation.cc \ 39 42 PolynomialWeighted.h -
trunk/yat/regression/PolynomialInterpolation.cc
r1646 r1647 20 20 */ 21 21 22 #include " LinearInterpolation.h"22 #include "PolynomialInterpolation.h" 23 23 24 24 #include <gsl/gsl_interp.h> … … 29 29 30 30 31 LinearInterpolation::LinearInterpolation(const utility::VectorBase& x,32 const utility::VectorBase& y)33 : GSLInterpolation(gsl_interp_ linear,x,y)31 PolynomialInterpolation::PolynomialInterpolation(const utility::VectorBase& x, 32 const utility::VectorBase& y) 33 : GSLInterpolation(gsl_interp_polynomial,x,y) 34 34 { 35 35 } 36 36 37 37 38 LinearInterpolation::~LinearInterpolation(void)38 PolynomialInterpolation::~PolynomialInterpolation(void) 39 39 { 40 40 } -
trunk/yat/regression/PolynomialInterpolation.h
r1646 r1647 1 #ifndef _theplu_yat_regression_ linear_interpolation_2 #define _theplu_yat_regression_ linear_interpolation_1 #ifndef _theplu_yat_regression_polynomial_interpolation_ 2 #define _theplu_yat_regression_polynomial_interpolation_ 3 3 4 4 // $Id$ … … 33 33 34 34 /** 35 \brief Linear interpolation. 35 \brief Polynomial interpolation. 36 37 This method should only be used for interpolating small numbers 38 of points because polynomial interpolation introduces large 39 oscillations, even for well-behaved datasets. The number of terms 40 in the interpolating polynomial is equal to the number of points. 36 41 37 42 \see Please refer to the base class documentation for genereal 38 43 introduction to the GSL based interpolation methods. 39 44 */ 40 class LinearInterpolation : public GSLInterpolation45 class PolynomialInterpolation : public GSLInterpolation 41 46 { 42 47 … … 45 50 \brief The default constructor 46 51 */ 47 LinearInterpolation(const utility::VectorBase& x,48 const utility::VectorBase& y);52 PolynomialInterpolation(const utility::VectorBase& x, 53 const utility::VectorBase& y); 49 54 50 55 /** 51 56 \brief The destructor 52 57 */ 53 ~ LinearInterpolation(void);58 ~PolynomialInterpolation(void); 54 59 55 60 private: … … 57 62 \brief Copy Constructor. (not implemented) 58 63 */ 59 LinearInterpolation(const LinearInterpolation&);64 PolynomialInterpolation(const PolynomialInterpolation&); 60 65 61 66 };
Note: See TracChangeset
for help on using the changeset viewer.