Helios++
Helios software for LiDAR simulations
fluxionum::DiffMinimizer< IT, OT > Class Template Reference

Base abstract class providing basic structure for minimization optimization of a given function based on its derivatives. More...

#include <DiffMinimizer.h>

Inheritance diagram for fluxionum::DiffMinimizer< IT, OT >:
Collaboration diagram for fluxionum::DiffMinimizer< IT, OT >:

Public Member Functions

 DiffMinimizer (function< OT(IT)> f, vector< function< OT(IT)>> df)
 Differential minimizer default constructor. More...
 
virtual vector< function< OT(IT)> > getDerivatives () const
 Obtain the derivatives of the function to be minimized. More...
 
virtual void setDerivatives (vector< function< OT(IT)>> df)
 Set the derivatives of the function to be minimized. More...
 
virtual size_t numDerivatives () const
 Obtain the number of available derivatives for the function to be minimized. More...
 
virtual function< OT(IT)> getDerivative (size_t const i)
 Obtain the i-th derivative for the function being minimized. More...
 
virtual void setDerivative (size_t const i, function< OT(IT)> df)
 Set the i-th derivative for the function being minimized. More...
 
virtual void removeDerivative (size_t const i)
 Remove the i-th derivative for the function being minimized. More...
 
virtual void addDerivative (function< OT(IT)> df)
 Append given derivative. More...
 
- Public Member Functions inherited from fluxionum::Minimizer< IT, OT >
 Minimizer (function< OT(IT)> f)
 Minimizer default constructor. More...
 
virtual IT argmin (IT x)=0
 Find the argument which minimizes minimizer's function. More...
 
virtual function< OT(IT)> getF () const
 Obtain the function to be minimized. More...
 
virtual void setF (function< OT(IT)> f)
 Set the function to be minimized. More...
 

Protected Attributes

vector< function< OT(IT)> > df
 The derivatives of the function to be minimized such that df[i] corresponds with \(\frac{d^if}{dx^i}\).
 
- Protected Attributes inherited from fluxionum::Minimizer< IT, OT >
function< OT(IT)> f
 The function to be minimized.
 

Private Member Functions

template<typename Archive >
void serialize (Archive &ar, unsigned int const version)
 Serialize the differential minimizer to a stream of bytes. More...
 

Friends

class boost::serialization::access
 

Detailed Description

template<typename IT, typename OT>
class fluxionum::DiffMinimizer< IT, OT >

Base abstract class providing basic structure for minimization optimization of a given function based on its derivatives.

Author
Alberto M. Esmoris Pena
Version
1.0
Template Parameters
ITType of input for the function to be minimized and its derivatives
OTType of output for the function to be minimized and its derivatives
See also
fluxionum::Minimizer

Constructor & Destructor Documentation

◆ DiffMinimizer()

template<typename IT , typename OT >
fluxionum::DiffMinimizer< IT, OT >::DiffMinimizer ( function< OT(IT)>  f,
vector< function< OT(IT)>>  df 
)
inline

Differential minimizer default constructor.

See also
fluxionum::DiffMinimizer::df

Member Function Documentation

◆ addDerivative()

template<typename IT , typename OT >
virtual void fluxionum::DiffMinimizer< IT, OT >::addDerivative ( function< OT(IT)>  df)
inlinevirtual

Append given derivative.

See also
fluxionum::DiffMinimizer::df

◆ getDerivative()

template<typename IT , typename OT >
virtual function<OT(IT)> fluxionum::DiffMinimizer< IT, OT >::getDerivative ( size_t const  i)
inlinevirtual

Obtain the i-th derivative for the function being minimized.

Parameters
iIndex of the derivative to be obtained
Returns
i-th derivative for the function being minimized
See also
fluxionum::DiffMinimizer::df

◆ getDerivatives()

template<typename IT , typename OT >
virtual vector<function<OT(IT)> > fluxionum::DiffMinimizer< IT, OT >::getDerivatives ( ) const
inlinevirtual

Obtain the derivatives of the function to be minimized.

Returns
Derivatives of the function to be minimized
See also
fluxionum::DiffMinimizer::df

◆ numDerivatives()

template<typename IT , typename OT >
virtual size_t fluxionum::DiffMinimizer< IT, OT >::numDerivatives ( ) const
inlinevirtual

Obtain the number of available derivatives for the function to be minimized.

Returns
Number of available derivatives for the function to be minimized
See also
fluxionum::DiffMinimizer::df

◆ removeDerivative()

template<typename IT , typename OT >
virtual void fluxionum::DiffMinimizer< IT, OT >::removeDerivative ( size_t const  i)
inlinevirtual

Remove the i-th derivative for the function being minimized.

Parameters
iIndex of the derivative to be removed
See also
fluxionum::DiffMinimizer::df

◆ serialize()

template<typename IT , typename OT >
template<typename Archive >
void fluxionum::DiffMinimizer< IT, OT >::serialize ( Archive &  ar,
unsigned int const  version 
)
inlineprivate

Serialize the differential minimizer to a stream of bytes.

Template Parameters
ArchiveType of rendering
Parameters
arSpecific rendering for the stream of bytes
versionVersion number for the differential minimizer

◆ setDerivative()

template<typename IT , typename OT >
virtual void fluxionum::DiffMinimizer< IT, OT >::setDerivative ( size_t const  i,
function< OT(IT)>  df 
)
inlinevirtual

Set the i-th derivative for the function being minimized.

Parameters
iIndex of the derivative to be setted
dfNew i-th derivative for the function being minimized
See also
fluxionum::DiffMinimizer::df

◆ setDerivatives()

template<typename IT , typename OT >
virtual void fluxionum::DiffMinimizer< IT, OT >::setDerivatives ( vector< function< OT(IT)>>  df)
inlinevirtual

Set the derivatives of the function to be minimized.

Parameters
dfNew vector of derivatives of the function to be minimized
See also
fluxionum::DiffMinimizer::df

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