ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Higher level interface for interpolation. More...
#include <spline.hpp>
Public Types | |
typedef gsl_interp_type | type |
Convenience typedef. More... | |
Public Member Functions | |
spline () | |
The default constructor is only really useful for assigning to. More... | |
spline (type const *T, size_t const n) | |
The default constructor creates a new spline with n elements. More... | |
spline (gsl_spline *v) | |
Could construct from a gsl_spline. More... | |
spline (spline const &v) | |
The copy constructor. More... | |
spline & | operator= (spline const &v) |
The assignment operator. More... | |
~spline () | |
The destructor only deletes the pointers if count reaches zero. More... | |
spline (spline &&v) | |
Move constructor. More... | |
spline & | operator= (spline &&v) |
Move operator. More... | |
bool | operator== (spline const &v) const |
Two spline are identically equal if their elements are identical. More... | |
bool | operator!= (spline const &v) const |
Two spline are different if their elements are not identical. More... | |
bool | operator< (spline const &v) const |
A container needs to define an ordering for sorting. More... | |
bool | operator> (spline const &v) const |
A container needs to define an ordering for sorting. More... | |
bool | operator<= (spline const &v) const |
A container needs to define an ordering for sorting. More... | |
bool | operator>= (spline const &v) const |
A container needs to define an ordering for sorting. More... | |
bool | empty () const |
Find if the spline is empty. More... | |
void | swap (spline &v) |
Swap two spline objects. More... | |
gsl_spline * | get () const |
Get the gsl_spline. More... | |
bool | unique () const |
Find if this is the only object sharing the gsl_spline. More... | |
size_t | use_count () const |
Find how many spline objects share this pointer. More... | |
operator bool () const | |
Allow conversion to bool. More... | |
int | init (double const xa[], double const ya[], size_t size) |
C++ version of gsl_spline_init(). More... | |
template<typename XA , typename YA > | |
int | init (XA const &xa, YA const &ya) |
C++ version of gsl_spline_init(). More... | |
char const * | name () const |
C++ version of gsl_spline_name(). More... | |
unsigned int | min_size () const |
C++ version of gsl_spline_min_size(). More... | |
int | eval_e (double x, interp::accel &a, double *y) const |
C++ version of gsl_spline_eval_e(). More... | |
int | eval_e (double x, interp::accel &a, double &y) const |
C++ version of gsl_spline_eval_e(). More... | |
double | eval (double x, interp::accel &a) const |
C++ version of gsl_spline_eval(). More... | |
int | eval_deriv_e (double x, interp::accel &a, double *y) const |
C++ version of gsl_spline_eval_deriv_e(). More... | |
int | eval_deriv_e (double x, interp::accel &a, double &y) const |
C++ version of gsl_spline_eval_deriv_e(). More... | |
double | eval_deriv (double x, interp::accel &a) const |
C++ version of gsl_spline_eval_deriv(). More... | |
int | eval_deriv2_e (double x, interp::accel &a, double *y) const |
C++ version of gsl_spline_eval_deriv2_e(). More... | |
int | eval_deriv2_e (double x, interp::accel &a, double &y) const |
C++ version of gsl_spline_eval_deriv2_e(). More... | |
double | eval_deriv2 (double x, interp::accel &a) const |
C++ version of gsl_spline_eval_deriv2(). More... | |
int | eval_integ_e (double a, double b, interp::accel &acc, double *y) const |
C++ version of gsl_spline_eval_integ_e(). More... | |
int | eval_integ_e (double a, double b, interp::accel &acc, double &y) const |
C++ version of gsl_spline_eval_integ_e(). More... | |
double | eval_integ (double a, double b, interp::accel &acc) const |
C++ version of gsl_spline_eval_integ(). More... | |
Private Attributes | |
gsl_spline * | ccgsl_pointer |
The shared pointer. More... | |
size_t * | count |
The shared reference count. More... | |
Higher level interface for interpolation.
Definition at line 31 of file spline.hpp.
typedef gsl_interp_type gsl::spline::type |
Convenience typedef.
Definition at line 36 of file spline.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 40 of file spline.hpp.
References ccgsl_pointer, and count.
Referenced by operator=().
|
inlineexplicit |
The default constructor creates a new spline with n elements.
T | The interpolation type: use static functions from interp to choose a type |
n | The number of elements in the spline |
Definition at line 52 of file spline.hpp.
References ccgsl_pointer, count, and gsl::rstat::n().
|
inlineexplicit |
Could construct from a gsl_spline.
This is not usually a good idea. In this case we should not use gsl_spline_free() to deallocate the memory.
v | The spline |
Definition at line 68 of file spline.hpp.
References ccgsl_pointer, and count.
|
inline |
The copy constructor.
This creates a new reference to the workspace.
v | The spline to copy. |
Definition at line 79 of file spline.hpp.
References ccgsl_pointer, and count.
|
inline |
The destructor only deletes the pointers if count reaches zero.
Definition at line 98 of file spline.hpp.
References ccgsl_pointer, and count.
|
inline |
Move constructor.
v | The spline to move. |
Definition at line 110 of file spline.hpp.
References count.
|
inline |
Find if the spline is empty.
true
if has size zero; otherwise false
Definition at line 187 of file spline.hpp.
References ccgsl_pointer.
|
inline |
C++ version of gsl_spline_eval().
x | a given value of x |
a | an accelerator |
Definition at line 293 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv().
x | a given value of x |
a | an accelerator |
Definition at line 321 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv2().
x | a given value of x |
a | an accelerator |
Definition at line 349 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv2_e().
x | a given value of x |
a | an accelerator |
y | the second derivative of the interpolated value at x (return value) |
Definition at line 340 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv2_e().
x | a given value of x |
a | an accelerator |
y | the second derivative of the interpolated value at x (return value) |
Definition at line 331 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv_e().
x | a given value of x |
a | an accelerator |
y | the derivative of the interpolated value at x (return value) |
Definition at line 312 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_deriv_e().
x | a given value of x |
a | an accelerator |
y | the derivative of the interpolated value at x (return value) |
Definition at line 303 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_e().
x | a given value of x |
a | an accelerator |
y | the interpolated value of y at x (return value) |
Definition at line 284 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_e().
x | a given value of x |
a | an accelerator |
y | the interpolated value of y at x (return value) |
Definition at line 275 of file spline.hpp.
References gsl::sf::mathieu::a(), and get().
|
inline |
C++ version of gsl_spline_eval_integ().
a | lower limit of integration |
b | upper limit of integration |
acc | an accelerator |
Definition at line 380 of file spline.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), gsl::interp::accel::get(), and get().
|
inline |
C++ version of gsl_spline_eval_integ_e().
a | lower limit of integration |
b | upper limit of integration |
acc | an accelerator |
y | interpolated integral between a and b (return value) |
Definition at line 370 of file spline.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), gsl::interp::accel::get(), and get().
|
inline |
C++ version of gsl_spline_eval_integ_e().
a | lower limit of integration |
b | upper limit of integration |
acc | an accelerator |
y | interpolated integral between a and b (return value) |
Definition at line 360 of file spline.hpp.
References gsl::sf::mathieu::a(), gsl::sf::mathieu::b(), gsl::interp::accel::get(), and get().
|
inline |
Get the gsl_spline.
Definition at line 213 of file spline.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_spline_init().
xa[] | the array of x values |
ya[] | the array of y values |
size | the size of xa and ya |
Definition at line 242 of file spline.hpp.
References get(), and gsl::cheb::size().
|
inline |
C++ version of gsl_spline_init().
This version handles std::vector and gsl::vector.
xa | the array of x values |
ya | the array of y values |
Definition at line 253 of file spline.hpp.
References get().
|
inline |
C++ version of gsl_spline_min_size().
Definition at line 266 of file spline.hpp.
References get().
|
inline |
C++ version of gsl_spline_name().
Definition at line 260 of file spline.hpp.
References get().
|
inlineexplicit |
Allow conversion to bool.
true
or false
according as this contains a pointer to a gsl_spline. Definition at line 233 of file spline.hpp.
References ccgsl_pointer.
|
inline |
Two spline are different if their elements are not identical.
v | The spline to be compared with this |
false
or true
according as this
and v
have identical elements or not Definition at line 140 of file spline.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 spline is nonnegative.
v | The spline to be compared with this |
false
or true
according as this
is less than v
lexicographically Definition at line 152 of file spline.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 spline is nonnegative.
v | The spline to be compared with this |
false
or true
according as this
is less than or equal to v
lexicographically Definition at line 172 of file spline.hpp.
References ccgsl_pointer.
Move operator.
v | The spline to move. |
Definition at line 119 of file spline.hpp.
References spline().
The assignment operator.
This copies elementwise.
v | The spline to copy |
Definition at line 86 of file spline.hpp.
References ccgsl_pointer, and count.
|
inline |
Two spline are identically equal if their elements are identical.
v | The spline to be compared with this |
true
or false
according as this
and v
have identical elements or not Definition at line 132 of file spline.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 spline is nonnegative.
v | The spline to be compared with this |
false
or true
according as this
is greater than v
lexicographically Definition at line 162 of file spline.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 spline is nonnegative.
v | The spline to be compared with this |
false
or true
according as this
is no less than v
lexicographically Definition at line 182 of file spline.hpp.
References ccgsl_pointer.
|
inline |
Swap two spline objects.
This works even if the spline have different sizes because it swaps pointers.
v | The spline to swap with this . |
Definition at line 194 of file spline.hpp.
References ccgsl_pointer, and count.
|
inline |
Find if this is the only object sharing the gsl_spline.
true
or falses
according as this is the only spline object sharing the gsl_spline. Definition at line 219 of file spline.hpp.
References count.
|
inline |
Find how many spline objects share this pointer.
Definition at line 224 of file spline.hpp.
References count.
|
private |
The shared pointer.
Definition at line 202 of file spline.hpp.
Referenced by empty(), get(), operator bool(), operator<(), operator<=(), operator=(), operator==(), operator>(), operator>=(), spline(), swap(), and ~spline().
|
private |
The shared reference count.
Definition at line 206 of file spline.hpp.
Referenced by operator=(), spline(), swap(), unique(), use_count(), and ~spline().