cisst-saw
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
nmrFnSolver Class Reference

#include <nmrFnSolver.h>

Public Member Functions

 nmrFnSolver (void)
 
 nmrFnSolver (CISSTNETLIB_INTEGER n)
 
void Allocate (CISSTNETLIB_INTEGER n)
 
 nmrFnSolver (vctDynamicVector< CISSTNETLIB_DOUBLE > &X)
 
void Allocate (vctDynamicVector< CISSTNETLIB_DOUBLE > &X)
 
template<int __instanceLine, class __elementType >
void Solve (nmrCallBackFunctionF< __instanceLine, __elementType > &callBack, vctDynamicVector< CISSTNETLIB_DOUBLE > &X, vctDynamicVector< CISSTNETLIB_DOUBLE > &F, CISSTNETLIB_DOUBLE tolerance) throw (std::runtime_error)
 

Protected Attributes

CISSTNETLIB_INTEGER N
 
CISSTNETLIB_DOUBLE Tolerance
 
CISSTNETLIB_INTEGER Info
 
CISSTNETLIB_INTEGER Lwork
 
vctDynamicVector
< CISSTNETLIB_DOUBLE > 
Work
 

Detailed Description

Algorithm Fn: Solve nonlinear set of equations using Powell's method The purpose of this class is to find a zero of a system of N nonlinear functions in N variables by a modification of the powell hybrid method. the user must provide a subroutine which calculates the functions and the jacobian.

The data members of this class are:

The input/output from this class is:

Note
This code relies on the ERC CISST cnetlib library. Since cnetlib is optional, make sure that CISST_HAS_CNETLIB has been turned ON during the configuration with CMake.

Constructor & Destructor Documentation

nmrFnSolver::nmrFnSolver ( void  )
inline

Default constructor. This constructor doesn't allocate any memory. If you use this constructor, you will need to use one of the Allocate() methods before you can use the Solve method.

nmrFnSolver::nmrFnSolver ( CISSTNETLIB_INTEGER  n)
inline

Constructor with memory allocation. This constructor allocates the memory based on N. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension.

Parameters
nNumber of variables This order will be used for the output as well.
nmrFnSolver::nmrFnSolver ( vctDynamicVector< CISSTNETLIB_DOUBLE > &  X)
inline

Constructor with memory allocation. This constructor allocates the memory based on the actual input of the Solve() method. It relies on the method Allocate(). The next call to the Solve() method will check that the parameters match the dimension and storage order.

Member Function Documentation

void nmrFnSolver::Allocate ( CISSTNETLIB_INTEGER  n)
inline

This method allocates the memory based on N. The next call to the Solve() method will check that the parameters match the dimension.

Parameters
nNumber of variables
void nmrFnSolver::Allocate ( vctDynamicVector< CISSTNETLIB_DOUBLE > &  X)
inline

Allocate memory to solve this problem. This method provides a convenient way to extract the required sizes from the input containers. The next call to the Solve() method will check that the parameters match the dimension.

template<int __instanceLine, class __elementType >
void nmrFnSolver::Solve ( nmrCallBackFunctionF< __instanceLine, __elementType > &  callBack,
vctDynamicVector< CISSTNETLIB_DOUBLE > &  X,
vctDynamicVector< CISSTNETLIB_DOUBLE > &  F,
CISSTNETLIB_DOUBLE  tolerance 
)
throw (std::runtime_error
)
inline

This computes the solves nonlinear equations problem invloving N functions in N variables. On input, X contains the starting point, On output, X contains the final estimate F contains the final values

Member Data Documentation

CISSTNETLIB_INTEGER nmrFnSolver::Info
protected
CISSTNETLIB_INTEGER nmrFnSolver::Lwork
protected
CISSTNETLIB_INTEGER nmrFnSolver::N
protected
CISSTNETLIB_DOUBLE nmrFnSolver::Tolerance
protected
vctDynamicVector<CISSTNETLIB_DOUBLE> nmrFnSolver::Work
protected

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