|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Interpolation functions and objects. More...
#include <interp.hpp>

Classes | |
| class | accel |
| Workspace for acceleration. More... | |
Public Types | |
| typedef gsl_interp_type | type |
| Convenient typedef. More... | |
Public Member Functions | |
| interp () | |
| The default constructor is only really useful for assigning to. More... | |
| interp (type const *T, size_t const n) | |
| The default constructor creates a new interp with n elements. More... | |
| interp (gsl_interp *v) | |
| Could construct from a gsl_interp. More... | |
| interp (interp const &v) | |
| The copy constructor. More... | |
| interp & | operator= (interp const &v) |
| The assignment operator. More... | |
| ~interp () | |
| The destructor only deletes the pointers if count reaches zero. More... | |
| interp (interp &&v) | |
| Move constructor. More... | |
| interp & | operator= (interp &&v) |
| Move operator. More... | |
| bool | operator== (interp const &v) const |
| Two interp are identically equal if their elements are identical. More... | |
| bool | operator!= (interp const &v) const |
| Two interp are different if their elements are not identical. More... | |
| bool | operator< (interp const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator> (interp const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator<= (interp const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | operator>= (interp const &v) const |
| A container needs to define an ordering for sorting. More... | |
| bool | empty () const |
| Find if the interp is empty. More... | |
| void | swap (interp &v) |
| Swap two interp objects. More... | |
| gsl_interp * | get () const |
| Get the gsl_interp. More... | |
| bool | unique () const |
| Find if this is the only object sharing the gsl_interp. More... | |
| size_t | use_count () const |
| Find how many interp objects share this pointer. More... | |
| operator bool () const | |
| Allow conversion to bool. More... | |
| int | init (double const xa[], double const ya[], size_t const size) |
| C++ version of gsl_interp_init(). More... | |
| template<typename XA , typename YA > | |
| int | init (XA const &xa, YA const &ya) |
| C++ version of gsl_interp_init(). More... | |
| char const * | name () const |
| C++ version of gsl_interp_name(). More... | |
| unsigned int | min_size () const |
| C++ version of gsl_interp_min_size(). More... | |
| unsigned int | type_min_size (gsl_interp_type const *T) |
| C++ version of gsl_interp_type_min_size(). More... | |
| int | eval_e (double const xa[], double const ya[], double x, accel &a, double &y) const |
| C++ version of gsl_interp_eval_e(). More... | |
| double | eval (double const xa[], double const ya[], double x, accel &a) const |
| C++ version of gsl_interp_eval(). More... | |
| int | eval_deriv_e (double const xa[], double const ya[], double x, accel &a, double &d) const |
| C++ version of gsl_interp_eval_deriv_e(). More... | |
| double | eval_deriv (double const xa[], double const ya[], double x, accel &a) const |
| C++ version of gsl_interp_eval_deriv(). More... | |
| int | eval_deriv2_e (double const xa[], double const ya[], double x, accel &a, double &d2) const |
| C++ version of gsl_interp_eval_deriv2_e(). More... | |
| double | eval_deriv2 (double const xa[], double const ya[], double x, accel &a) const |
| C++ version of gsl_interp_eval_deriv2(). More... | |
| int | eval_integ_e (double const xa[], double const ya[], double a, double b, accel &acc, double &result) const |
| C++ version of gsl_interp_eval_integ_e(). More... | |
| double | eval_integ (double const xa[], double const ya[], double a, double b, accel &acc) const |
| C++ version of gsl_interp_eval_integ(). More... | |
| size_t | bsearch (double const x_array[], double x, size_t index_lo, size_t index_hi) |
| C++ version of gsl_interp_bsearch(). More... | |
| template<typename XA , typename YA > | |
| int | eval_e (XA const &xa, YA const &ya, double x, accel &a, double &y) const |
| C++ version of gsl_interp_eval_e(). More... | |
| template<typename XA , typename YA > | |
| double | eval (XA const &xa, YA const &ya, double x, accel &a) const |
| C++ version of gsl_interp_eval(). More... | |
| template<typename XA , typename YA > | |
| int | eval_deriv_e (XA const &xa, YA const &ya, double x, accel &a, double &d) const |
| C++ version of gsl_interp_eval_deriv_e(). More... | |
| template<typename XA , typename YA > | |
| double | eval_deriv (XA const &xa, YA const &ya, double x, accel &a) const |
| C++ version of gsl_interp_eval_deriv(). More... | |
| template<typename XA , typename YA > | |
| int | eval_deriv2_e (XA const &xa, YA const &ya, double x, accel &a, double &d2) const |
| C++ version of gsl_interp_eval_deriv2_e(). More... | |
| template<typename XA , typename YA > | |
| double | eval_deriv2 (XA const &xa, YA const &ya, double x, accel &a) const |
| C++ version of gsl_interp_eval_deriv2(). More... | |
| template<typename XA , typename YA > | |
| int | eval_integ_e (XA const &xa, YA const &ya, double a, double b, accel &acc, double &result) const |
| C++ version of gsl_interp_eval_integ_e(). More... | |
| template<typename XA , typename YA > | |
| double | eval_integ (XA const &xa, YA const &ya, double a, double b, accel &acc) const |
| C++ version of gsl_interp_eval_integ(). More... | |
Static Public Member Functions | |
| template<typename X > | |
| static size_t | bsearch (X const &x_array, double x, size_t index_lo, size_t index_hi) |
| C++ version of gsl_interp_bsearch(). More... | |
| static type const * | cspline () |
| Static type. More... | |
| static type const * | cspline_periodic () |
| Static type. More... | |
| static type const * | akima () |
| Static type. More... | |
| static type const * | akima_periodic () |
| Static type. More... | |
| static type const * | steffen () |
| Static type. More... | |
Private Attributes | |
| gsl_interp * | ccgsl_pointer |
| The shared pointer. More... | |
| size_t * | count |
| The shared reference count. More... | |
Interpolation functions and objects.
Definition at line 31 of file interp.hpp.
| typedef gsl_interp_type gsl::interp::type |
Convenient typedef.
Definition at line 36 of file interp.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 40 of file interp.hpp.
References ccgsl_pointer, and count.
Referenced by operator=().
|
inlineexplicit |
The default constructor creates a new interp with n elements.
| T | The interpolation type |
| n | The number of elements in the interp |
Definition at line 51 of file interp.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_interp.
This is not usually a good idea. In this case we should not use gsl_interp_free() to deallocate the memory.
| v | The interp |
Definition at line 67 of file interp.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
| v | The interp to copy. |
Definition at line 78 of file interp.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 97 of file interp.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
| v | The interp to move. |
Definition at line 109 of file interp.hpp.
References count.
|
inlinestatic |
|
inlinestatic |
|
inline |
C++ version of gsl_interp_bsearch().
| x_array[] | the array of x values |
| x | a given value x |
| index_lo | lower bound for result |
| index_hi | upper bound for result |
Definition at line 652 of file interp.hpp.
|
inlinestatic |
C++ version of gsl_interp_bsearch().
This version handles std::vector and gsl::vector.
| x_array | the array of x values |
| x | a given value x |
| index_lo | lower bound for result |
| index_hi | upper bound for result |
Definition at line 839 of file interp.hpp.
|
inlinestatic |
|
inlinestatic |
|
inline |
Find if the interp is empty.
true if has size zero; otherwise false Definition at line 186 of file interp.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_interp_eval().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 528 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 695 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 564 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 737 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv2().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 600 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv2().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
Definition at line 779 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv2_e().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
| d2 | the interpolated value of the second derivative of y at x (return value) |
Definition at line 589 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv2_e().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
| d2 | the interpolated value of the second derivative of y at x (return value) |
Definition at line 766 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv_e().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
| d | the interpolated value of the derivative of y at x (return value) |
Definition at line 553 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_deriv_e().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
| d | the interpolated value of the derivative of y at x (return value) |
Definition at line 724 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_e().
| xa[] | the array of x values |
| ya[] | the array of y values |
| x | a given value x |
| a | an accelerator |
| y | the interpolated value of y at x (return value) |
Definition at line 517 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_e().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| x | a given value x |
| a | an accelerator |
| y | the interpolated value of y at x (return value) |
Definition at line 682 of file interp.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_interp_eval_integ().
| xa[] | the array of x values |
| ya[] | the array of y values |
| a | the lower integral limit |
| b | the upper integral limit |
| acc | an accelerator |
Definition at line 641 of file interp.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), get(), and gsl::interp::accel::get().
|
inline |
C++ version of gsl_interp_eval_integ().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| a | the lower integral limit |
| b | the upper integral limit |
| acc | an accelerator |
Definition at line 826 of file interp.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), get(), and gsl::interp::accel::get().
|
inline |
C++ version of gsl_interp_eval_integ_e().
| xa[] | the array of x values |
| ya[] | the array of y values |
| a | the lower integral limit |
| b | the upper integral limit |
| acc | an accelerator |
| result | the interpolated integral between a and b (return value) |
Definition at line 628 of file interp.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), get(), and gsl::interp::accel::get().
|
inline |
C++ version of gsl_interp_eval_integ_e().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
| a | the lower integral limit |
| b | the upper integral limit |
| acc | an accelerator |
| result | the interpolated integral between a and b (return value) |
Definition at line 811 of file interp.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), get(), and gsl::interp::accel::get().
|
inline |
Get the gsl_interp.
Definition at line 212 of file interp.hpp.
References ccgsl_pointer.
Referenced by eval(), eval_deriv(), eval_deriv2(), eval_deriv2_e(), eval_deriv_e(), eval_e(), eval_integ(), eval_integ_e(), init(), min_size(), and name().
|
inline |
C++ version of gsl_interp_init().
| xa[] | the array of x values |
| ya[] | the array of y values |
| size | the size of xa and ya |
Definition at line 460 of file interp.hpp.
References get(), and gsl::cheb::size().
|
inline |
C++ version of gsl_interp_init().
This version handles std::vector and gsl::vector.
| xa | the array of x values |
| ya | the array of y values |
Definition at line 471 of file interp.hpp.
References get().
|
inline |
C++ version of gsl_interp_min_size().
Definition at line 486 of file interp.hpp.
References get().
|
inline |
C++ version of gsl_interp_name().
Definition at line 480 of file interp.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true or false according as this contains a pointer to a gsl_interp. Definition at line 232 of file interp.hpp.
References ccgsl_pointer.
|
inline |
Two interp are different if their elements are not identical.
| v | The interp to be compared with this |
false or true according as this and v have identical elements or not Definition at line 139 of file interp.hpp.
References operator==().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a interp is nonnegative.
| v | The interp to be compared with this |
false or true according as this is less than v lexicographically Definition at line 151 of file interp.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a interp is nonnegative.
| v | The interp to be compared with this |
false or true according as this is less than or equal to v lexicographically Definition at line 171 of file interp.hpp.
References ccgsl_pointer.
Move operator.
| v | The interp to move. |
Definition at line 118 of file interp.hpp.
References interp().
The assignment operator.
This copies elementwise.
| v | The interp to copy |
Definition at line 85 of file interp.hpp.
References ccgsl_pointer, and count.
|
inline |
Two interp are identically equal if their elements are identical.
| v | The interp to be compared with this |
true or false according as this and v have identical elements or not Definition at line 131 of file interp.hpp.
References ccgsl_pointer.
Referenced by operator!=().
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a interp is nonnegative.
| v | The interp to be compared with this |
false or true according as this is greater than v lexicographically Definition at line 161 of file interp.hpp.
References ccgsl_pointer.
|
inline |
A container needs to define an ordering for sorting.
This uses standard lexicographical ordering and so is not useful, for example, for checking, that a interp is nonnegative.
| v | The interp to be compared with this |
false or true according as this is no less than v lexicographically Definition at line 181 of file interp.hpp.
References ccgsl_pointer.
|
inlinestatic |
|
inline |
Swap two interp objects.
This works even if the interp have different sizes because it swaps pointers.
| v | The interp to swap with this. |
Definition at line 193 of file interp.hpp.
References ccgsl_pointer, and count.
|
inline |
C++ version of gsl_interp_type_min_size().
| T | The type |
Definition at line 493 of file interp.hpp.
|
inline |
Find if this is the only object sharing the gsl_interp.
true or falses according as this is the only interp object sharing the gsl_interp. Definition at line 218 of file interp.hpp.
References count.
|
inline |
Find how many interp objects share this pointer.
Definition at line 223 of file interp.hpp.
References count.
|
private |
The shared pointer.
Definition at line 201 of file interp.hpp.
Referenced by empty(), get(), interp(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), swap(), and ~interp().
|
private |
The shared reference count.
Definition at line 205 of file interp.hpp.
Referenced by interp(), operator=(), swap(), unique(), use_count(), and ~interp().