Crocoddyl
ActivationModelQuadFlatLogTpl< _Scalar > Class Template Reference

Quadratic-flat-log activation. More...

#include <quadratic-flat-log.hpp>

Inheritance diagram for ActivationModelQuadFlatLogTpl< _Scalar >:
ActivationModelAbstractTpl< _Scalar >

Public Types

typedef ActivationDataAbstractTpl< Scalar > ActivationDataAbstract
 
typedef ActivationModelAbstractTpl< Scalar > Base
 
typedef ActivationDataQuadFlatLogTpl< Scalar > Data
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef MathBase::MatrixXs MatrixXs
 
typedef MathBase::VectorXs VectorXs
 
- Public Types inherited from ActivationModelAbstractTpl< _Scalar >
typedef ActivationDataAbstractTpl< Scalar > ActivationDataAbstract
 
typedef MathBaseTpl< Scalar > MathBase
 
typedef MathBase::MatrixXs MatrixXs
 
typedef MathBase::VectorXs VectorXs
 

Public Member Functions

 ActivationModelQuadFlatLogTpl (const std::size_t &nr, const Scalar &alpha=Scalar(1.))
 
virtual void calc (const boost::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r)
 
virtual void calcDiff (const boost::shared_ptr< ActivationDataAbstract > &data, const Eigen::Ref< const VectorXs > &r)
 
virtual boost::shared_ptr< ActivationDataAbstractcreateData ()
 
Scalar get_alpha () const
 
virtual void print (std::ostream &os) const
 Print relevant information of the quadratic flat-log model. More...
 
void set_alpha (const Scalar alpha)
 
- Public Member Functions inherited from ActivationModelAbstractTpl< _Scalar >
 ActivationModelAbstractTpl (const std::size_t nr)
 
std::size_t get_nr () const
 

Public Attributes

EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 
- Public Attributes inherited from ActivationModelAbstractTpl< _Scalar >
EIGEN_MAKE_ALIGNED_OPERATOR_NEW typedef _Scalar Scalar
 

Protected Attributes

std::size_t nr_
 
- Protected Attributes inherited from ActivationModelAbstractTpl< _Scalar >
std::size_t nr_
 

Detailed Description

template<typename _Scalar>
class crocoddyl::ActivationModelQuadFlatLogTpl< _Scalar >

Quadratic-flat-log activation.

This activation function describes a logarithmic quadratic activation depending on the quadratic norm of a residual vector, i.e.

\[ \begin{equation} log(1 + \|\mathbf{r}\|^2 / \alpha) \end{equation} \]

where \(\alpha\) defines the width of the quadratic basin, \(r\) is the scalar residual, \(nr\) is the dimension of the residual vector.

The computation of the function and it derivatives are carried out in calc() and caldDiff(), respectively.

See also
calc(), calcDiff(), createData()

Definition at line 33 of file quadratic-flat-log.hpp.

Member Function Documentation

◆ print()

virtual void print ( std::ostream &  os) const
inlinevirtual

Print relevant information of the quadratic flat-log model.

Parameters
[out]osOutput stream object

Reimplemented from ActivationModelAbstractTpl< _Scalar >.

Definition at line 123 of file quadratic-flat-log.hpp.


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