ccgsl 2.7.2
C++wrappersforGnuScientificLibrary
gsl::multilarge::nlinear::function_fdf Class Reference

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

#include <multilarge_nlinear_function_fdf.hpp>

Inheritance diagram for gsl::multilarge::nlinear::function_fdf:
Inheritance graph
Collaboration diagram for gsl::multilarge::nlinear::function_fdf:
Collaboration graph

Classes

struct  concept_fdf
 This is an abstract base class. More...
 
struct  concept_fvv
 This is an abstract base class. More...
 

Public Member Functions

 function_fdf ()
 The default constructor is only really useful for assigning to. More...
 
 function_fdf (gsl_multilarge_nlinear_fdf &v)
 Could construct from a gsl_multilarge_nlinear_fdf. More...
 
template<typename T >
 function_fdf (T &t)
 Construct from an object that implements gsl::multilarge::nlinear::function_fdf::concept. More...
 
 function_fdf (int(*const f)(gsl::vector const &, gsl::vector &), int(*const df)(CBLAS_TRANSPOSE_t, gsl::vector const &, gsl::vector const &, gsl::vector &, gsl::matrix &), int(*const fvv)(gsl::vector const &, gsl::vector &, gsl::vector &), size_t const xSize, size_t const fSize)
 Construct from a function with no parameters (but with n function values and arguments). More...
 
 function_fdf (function_fdf const &v)
 The copy constructor. More...
 
function_fdfoperator= (function_fdf const &v)
 The assignment operator. More...
 
 function_fdf (function_fdf &&v)
 Move constructor. More...
 
function_fdfoperator= (function_fdf &&v)
 Move operator. More...
 
 ~function_fdf ()
 The destructor unshares any shared resource. More...
 

Public Attributes

base_F * func
 This gives something for params to point to. More...
 
size_t * count
 The shared reference count: used for copying this. More...
 

Friends

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

Detailed Description

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

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

A multilarge::nlinear::function_fdf 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 multilarge::nlinear::function_fdf::concept to get a suitable function object. The multilarge::nlinear::function_fdf can then be constructed from a function object of this class.

Definition at line 56 of file multilarge_nlinear_function_fdf.hpp.

Constructor & Destructor Documentation

◆ function_fdf() [1/6]

gsl::multilarge::nlinear::function_fdf::function_fdf ( )
inline

The default constructor is only really useful for assigning to.

Definition at line 401 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), func, and gsl::rstat::n().

◆ function_fdf() [2/6]

gsl::multilarge::nlinear::function_fdf::function_fdf ( gsl_multilarge_nlinear_fdf &  v)
inlineexplicit

Could construct from a gsl_multilarge_nlinear_fdf.

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

Parameters
vThe gsl_multilarge_nlinear_fdf.

Definition at line 419 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), func, and gsl::rstat::n().

◆ function_fdf() [3/6]

template<typename T >
gsl::multilarge::nlinear::function_fdf::function_fdf ( T &  t)
inline

Construct from an object that implements gsl::multilarge::nlinear::function_fdf::concept.

Parameters
tAn object that implements gsl::multilarge::nlinear::function_fdf::concept.

Definition at line 439 of file multilarge_nlinear_function_fdf.hpp.

◆ function_fdf() [4/6]

gsl::multilarge::nlinear::function_fdf::function_fdf ( int(*)(gsl::vector const &, gsl::vector &)  f,
int(*)(CBLAS_TRANSPOSE_t, gsl::vector const &, gsl::vector const &, gsl::vector &, gsl::matrix &)  df,
int(*)(gsl::vector const &, gsl::vector &, gsl::vector &)  fvv,
size_t const  xSize,
size_t const  fSize 
)
inline

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

Parameters
fThe function to construct from.
dfThe derivatives to construct from.
fvvThe function and derivatives to construct from.
xSizeThe length of x
fSizeThe length of f

Definition at line 449 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), func, and gsl::rstat::n().

◆ function_fdf() [5/6]

gsl::multilarge::nlinear::function_fdf::function_fdf ( function_fdf const &  v)
inline

The copy constructor.

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

Parameters
vThe function to copy.

Definition at line 476 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), and gsl::rstat::n().

◆ function_fdf() [6/6]

gsl::multilarge::nlinear::function_fdf::function_fdf ( function_fdf &&  v)
inline

Move constructor.

Parameters
vThe function to move.

Definition at line 513 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), and gsl::rstat::n().

◆ ~function_fdf()

gsl::multilarge::nlinear::function_fdf::~function_fdf ( )
inline

The destructor unshares any shared resource.

Definition at line 543 of file multilarge_nlinear_function_fdf.hpp.

References count, and func.

Member Function Documentation

◆ operator=() [1/2]

function_fdf & gsl::multilarge::nlinear::function_fdf::operator= ( function_fdf &&  v)
inline

Move operator.

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

Definition at line 528 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), func, and gsl::rstat::n().

◆ operator=() [2/2]

function_fdf & gsl::multilarge::nlinear::function_fdf::operator= ( function_fdf const &  v)
inline

The assignment operator.

This makes a shared copy.

Parameters
vThe function to copy

Definition at line 490 of file multilarge_nlinear_function_fdf.hpp.

References count, gsl::multilarge::nlinear::df(), func, and gsl::rstat::n().

Friends And Related Function Documentation

◆ function_constructor

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

Member Data Documentation

◆ count

size_t* gsl::multilarge::nlinear::function_fdf::count

The shared reference count: used for copying this.

Definition at line 396 of file multilarge_nlinear_function_fdf.hpp.

Referenced by function_fdf(), operator=(), and ~function_fdf().

◆ func

base_F* gsl::multilarge::nlinear::function_fdf::func

This gives something for params to point to.

Definition at line 392 of file multilarge_nlinear_function_fdf.hpp.

Referenced by function_fdf(), operator=(), and ~function_fdf().


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