|
ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
|
Class that extends gsl_movstat_function so that it can be constructed from arbitrary function objects. More...
#include <movstat_function.hpp>


Public Member Functions | |
| function () | |
| The default constructor is only really useful for assigning to. More... | |
| function (double(*const f)(gsl::vector const &)) | |
| Construct from a function. More... | |
| template<typename T > | |
| function (T &c, double(T::*f)(gsl::vector const &)) | |
| Construct from a function object and a suitable member function. More... | |
| function (function const &v) | |
| The copy constructor. More... | |
| function & | operator= (function const &v) |
| The assignment operator. More... | |
| function (function &&v) | |
| Move constructor. More... | |
| function & | operator= (function &&v) |
| Move operator. More... | |
| ~function () | |
| The destructor unshares any shared resource. More... | |
Static Private Member Functions | |
| static double | fn (size_t n, double *x, void *params) |
| This is the function that gsl_movstat_function points to if function is constructed from a function object. More... | |
Private Attributes | |
| base_F * | base_f |
| size_t * | count |
| The shared reference count. More... | |
Class that extends gsl_movstat_function so that it can be constructed from arbitrary function objects.
The arbitrary function object dould be a object of a class containing a member function whose argument is a gsl::vector and return values are doubles. The member function may be declared const.
To construct an object of this class from a function object t of class T, use, for example,
where T::operator() is a member function whose single argument is a double. To assign, use, for example,
There are multiple forms of the function constructor and make_function(). These should allow you to construct a function object from any reasonable function object and quite a lot of unreasonable ones too. If f is an object of class gsl_movstat_function, it is always possible to pass &f to a gsl function that requires a gsl_movstat_function* argument.
This class is designed for flexibility rather than efficient copying. So if objects are to be copied frequently, consider using shared pointers or the like.
The class extends gsl_movstat_function. If constructed from a function object, gsl_movstat_function::params is always the function object and gsl_movstat_function::function calls the member function using params to obtain an object to call the member function from.
Definition at line 58 of file movstat_function.hpp.
|
inline |
The default constructor is only really useful for assigning to.
Definition at line 3353 of file movstat_function.hpp.
|
inlineexplicit |
Construct from a function.
| f | The function. |
Definition at line 3363 of file movstat_function.hpp.
|
inline |
Construct from a function object and a suitable member function.
| c | The function object. |
| f | The member function. |
Definition at line 3518 of file movstat_function.hpp.
|
inline |
The copy constructor.
This shares base_f.
| v | The function to copy. |
Definition at line 4189 of file movstat_function.hpp.
References count.
|
inline |
Move constructor.
| v | The function to move. |
Definition at line 4218 of file movstat_function.hpp.
References count.
|
inline |
The destructor unshares any shared resource.
Definition at line 4240 of file movstat_function.hpp.
|
inlinestaticprivate |
This is the function that gsl_movstat_function points to if function is constructed from a function object.
| n | The number of function arguments. |
| x | A double. |
| params | The parameters, which are always set to be a pointer to the function object. |
Definition at line 4257 of file movstat_function.hpp.
References gsl::sf::mathieu::b(), and gsl::rstat::n().
Move operator.
| v | The function to move. |
Definition at line 4229 of file movstat_function.hpp.
The assignment operator.
This makes a shared copy.
| v | The function to copy |
Definition at line 4199 of file movstat_function.hpp.
|
private |
Definition at line 3344 of file movstat_function.hpp.
Referenced by function(), operator=(), and ~function().
|
private |
The shared reference count.
Definition at line 3348 of file movstat_function.hpp.
Referenced by function(), operator=(), and ~function().