ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::multifit::function Class Reference

Class that extends gsl_multifit_function so that it can be constructed from arbitrary function objects. More...

#include <multifit_function.hpp>

Inheritance diagram for gsl::multifit::function:
Inheritance graph
Collaboration diagram for gsl::multifit::function:
Collaboration graph

Classes

struct  Concept
 This is an empty abstract base class. More...
 

Public Member Functions

 function ()
 The default constructor is only really useful for assigning to. More...
 
template<typename T >
void function_constructor (function &, T &)
 
 function (gsl_multifit_function &v)
 Could construct from a gsl_multifit_function. More...
 
template<typename T >
 function (T &t)
 Construct from an object that implements gsl::multifit::function::Concept. More...
 
 function (int(*const f)(gsl::vector const &, gsl::vector &), size_t n)
 Construct from a function with no parameters (but with n function values and arguments). More...
 
 function (function const &v)
 The copy constructor. More...
 
functionoperator= (function const &v)
 The assignment operator. More...
 
 function (function &&v)
 Move constructor. More...
 
functionoperator= (function &&v)
 Move operator. More...
 
 ~function ()
 The destructor unshares any shared resource. More...
 

Friends

template<typename T >
void function_constructor (function &, T &)
 

Detailed Description

Class that extends gsl_multifit_function so that it can be constructed from arbitrary function objects.

Since gsl::multifit::function is a subclass of gsl_multifit_function, a pointer to an object of this class can be used whenever a pointer to a gsl_multifit_function object is required. Thus, pointers to objects of this class can be used directly with the GNU Scientific Library.

A multifit::function with argument a vector of length n should compute and return n function values. In C++ it is straightforward to set up a class with a member function that implements multifit::function::Concept to get a suitable function object. The multifit::function can then be constructed from a function object of this class.

Definition at line 49 of file multifit_function.hpp.

Constructor & Destructor Documentation

◆ function() [1/6]

gsl::multifit::function::function ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 195 of file multifit_function.hpp.

References gsl::sf::hermite::func(), and gsl::rstat::n().

◆ function() [2/6]

gsl::multifit::function::function ( gsl_multifit_function &  v)
inlineexplicit

Could construct from a gsl_multifit_function.

This constructor is not actually visible, but gsl::multifit::function<T>() will construct the object correctly.

Parameters
vThe gsl_multifit_function.

Definition at line 213 of file multifit_function.hpp.

References gsl::sf::hermite::func(), and gsl::rstat::n().

◆ function() [3/6]

template<typename T >
gsl::multifit::function::function ( T &  t)
inline

Construct from an object that implements gsl::multifit::function::Concept.

Parameters
tAn object that implements gsl::multifit::function::Concept.

Definition at line 230 of file multifit_function.hpp.

◆ function() [4/6]

gsl::multifit::function::function ( int(*)(gsl::vector const &, gsl::vector &)  f,
size_t  n 
)
inline

Construct from a function with no parameters (but with n function values and arguments).

Parameters
fThe function to construct from.
nThe number of functions and number of arguments of each.

Definition at line 236 of file multifit_function.hpp.

References gsl::sf::hermite::func(), and gsl::rstat::n().

◆ function() [5/6]

gsl::multifit::function::function ( function const &  v)
inline

The copy constructor.

This shares f. This constructor is not actually visible, but gsl::multifit::function::multifit::function<T>() will construct the object correctly.

Parameters
vThe function to copy.

Definition at line 256 of file multifit_function.hpp.

References gsl::rstat::n().

◆ function() [6/6]

gsl::multifit::function::function ( function &&  v)
inline

Move constructor.

Parameters
vThe function to move.

Definition at line 289 of file multifit_function.hpp.

References gsl::rstat::n().

◆ ~function()

gsl::multifit::function::~function ( )
inline

The destructor unshares any shared resource.

Definition at line 315 of file multifit_function.hpp.

References gsl::sf::hermite::func().

Member Function Documentation

◆ function_constructor()

template<typename T >
void gsl::multifit::function::function_constructor ( function ,
T &   
)

◆ operator=() [1/2]

function & gsl::multifit::function::operator= ( function &&  v)
inline

Move operator.

Parameters
vThe function to move.
Returns
A reference to f in this.

Definition at line 302 of file multifit_function.hpp.

References gsl::sf::hermite::func(), and gsl::rstat::n().

◆ operator=() [2/2]

function & gsl::multifit::function::operator= ( function const &  v)
inline

The assignment operator.

This makes a shared copy.

Parameters
vThe function to copy

Definition at line 268 of file multifit_function.hpp.

References gsl::sf::hermite::func(), and gsl::rstat::n().

Friends And Related Function Documentation

◆ function_constructor

template<typename T >
void function_constructor ( function ,
T &   
)
friend

The documentation for this class was generated from the following file: