hpp::constraints::function::OfParameterSubset Class Reference

Function depending on a subset of parameters. More...

#include <hpp/constraints/function/of-parameter-subset.hh>

Inheritance diagram for hpp::constraints::function::OfParameterSubset:
[legend]
Collaboration diagram for hpp::constraints::function::OfParameterSubset:
[legend]

Static Public Member Functions

static OfParameterSubsetPtr_t create (const DifferentiableFunctionPtr_t &g, const size_type &nArgs, const size_type &nDers, const segment_t &inArgs, const segment_t &inDers)
 Create instance and return shared pointer. More...
 

Protected Member Functions

 OfParameterSubset (const DifferentiableFunctionPtr_t &g, const size_type &nArgs, const size_type &nDers, const segment_t &inArgs, const segment_t &inDers)
 Constructor. More...
 
void impl_compute (LiegroupElementRef y, vectorIn_t arg) const
 User implementation of function evaluation. More...
 
void impl_jacobian (matrixOut_t J, vectorIn_t arg) const
 
std::ostream & print (std::ostream &os) const
 Display object in a stream. More...
 
- Protected Member Functions inherited from hpp::constraints::DifferentiableFunction
 DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, size_type sizeOutput, std::string name=std::string())
 Concrete class constructor should call this constructor. More...
 
 DifferentiableFunction (size_type sizeInput, size_type sizeInputDerivative, const LiegroupSpacePtr_t &outputSpace, std::string name=std::string())
 Concrete class constructor should call this constructor. More...
 

Protected Attributes

DifferentiableFunctionPtr_t g_
 
const segment_t sa_
 
const segment_t sd_
 
- Protected Attributes inherited from hpp::constraints::DifferentiableFunction
size_type inputSize_
 Dimension of input vector. More...
 
size_type inputDerivativeSize_
 Dimension of input derivative. More...
 
LiegroupSpacePtr_t outputSpace_
 Dimension of output vector. More...
 
ArrayXb activeParameters_
 Initialized to true by this class. More...
 
ArrayXb activeDerivativeParameters_
 Initialized to true by this class. More...
 

Additional Inherited Members

- Public Member Functions inherited from hpp::constraints::DifferentiableFunction
virtual ~DifferentiableFunction ()
 
LiegroupElement operator() (vectorIn_t argument) const
 Evaluate the function at a given parameter. More...
 
void value (LiegroupElementRef result, vectorIn_t argument) const
 Evaluate the function at a given parameter. More...
 
void jacobian (matrixOut_t jacobian, vectorIn_t argument) const
 Computes the jacobian. More...
 
const ArrayXbactiveParameters () const
 Returns a vector of booleans that indicates whether the corresponding configuration parameter influences this constraints. More...
 
const ArrayXbactiveDerivativeParameters () const
 Returns a vector of booleans that indicates whether the corresponding velocity parameter influences this constraints. More...
 
size_type inputSize () const
 Get dimension of input vector. More...
 
size_type inputDerivativeSize () const
 Get dimension of input derivative vector. More...
 
LiegroupSpacePtr_t outputSpace () const
 Get output element. More...
 
size_type outputSize () const
 Get dimension of output vector. More...
 
size_type outputDerivativeSize () const
 Get dimension of output derivative vector. More...
 
const std::string & name () const
 Get function name. More...
 
std::string context () const
 
void context (const std::string &c)
 
void finiteDifferenceForward (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
 Approximate the jacobian using forward finite difference. More...
 
void finiteDifferenceCentral (matrixOut_t jacobian, vectorIn_t arg, DevicePtr_t robot=DevicePtr_t(), value_type eps=std::sqrt(Eigen::NumTraits< value_type >::epsilon())) const
 Approximate the jacobian using forward finite difference. More...
 

Detailed Description

Function depending on a subset of parameters.

This class implements a function over a configuration space, the output values of which only depend on a convex subset of parameters.

\begin{equation} f (q_1,\cdots,q_n) = g (q_{i},\cdots,q_{i+p-1}) \end{equation}

where

  • \(n\) is the dimension of the input configuration space,
  • \([i,i+p-1]\) is an interval included in \([1,n]\),
  • \(g\) is a differentiable mapping from \(\mathbf{R}^p\) to the output space of \(f\).

Constructor & Destructor Documentation

hpp::constraints::function::OfParameterSubset::OfParameterSubset ( const DifferentiableFunctionPtr_t g,
const size_type nArgs,
const size_type nDers,
const segment_t inArgs,
const segment_t inDers 
)
protected

Constructor.

Parameters
gthe mapping from the subset of parameters to the output space,
nArgsdimension \(n\) of the input space representation,
nDersdimension of the input tangent space,
inArgsinterval \([i,i+p-1]\) of configuration indices,
inDersinterval of velocity indices.

Member Function Documentation

static OfParameterSubsetPtr_t hpp::constraints::function::OfParameterSubset::create ( const DifferentiableFunctionPtr_t g,
const size_type nArgs,
const size_type nDers,
const segment_t inArgs,
const segment_t inDers 
)
inlinestatic

Create instance and return shared pointer.

Parameters
gthe mapping from the subset of parameters to the output space,
nArgsdimension \(n\) of the input space representation,
nDersdimension of the input tangent space,
inArgsinterval \([i,i+p-1]\) of configuration indices,
inDersinterval of velocity indices.
void hpp::constraints::function::OfParameterSubset::impl_compute ( LiegroupElementRef  result,
vectorIn_t  argument 
) const
inlineprotectedvirtual

User implementation of function evaluation.

Implements hpp::constraints::DifferentiableFunction.

void hpp::constraints::function::OfParameterSubset::impl_jacobian ( matrixOut_t  J,
vectorIn_t  arg 
) const
inlineprotectedvirtual
std::ostream& hpp::constraints::function::OfParameterSubset::print ( std::ostream &  o) const
protectedvirtual

Display object in a stream.

Reimplemented from hpp::constraints::DifferentiableFunction.

Member Data Documentation

DifferentiableFunctionPtr_t hpp::constraints::function::OfParameterSubset::g_
protected
const segment_t hpp::constraints::function::OfParameterSubset::sa_
protected
const segment_t hpp::constraints::function::OfParameterSubset::sd_
protected