Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::UnionErrorFunctionT< T > Class Template Reference

#include <union_error_function.h>

Inheritance diagram for momentum::UnionErrorFunctionT< T >:

Public Member Functions

 UnionErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt, const std::vector< std::shared_ptr< SkeletonErrorFunctionT< T > > > &errorFunctions)
double getError (const ModelParametersT< T > &params, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
double getGradient (const ModelParametersT< T > &params, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final
double getJacobian (const ModelParametersT< T > &params, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final
size_t getJacobianSize () const final
std::vector< std::string > inputs () const override
void getInputImp (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > result) const override
void setInputImp (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value) override
Eigen::Index getInputSize (const std::string &name) const override
const char * name () const override
Eigen::VectorX< T > d_gradient_d_input_dot (const std::string &inputName, const ModelParametersT< T > &modelParams, const SkeletonStateT< T > &state, Eigen::Ref< const Eigen::VectorX< T > > inputVec) override
Public Member Functions inherited from momentum::SkeletonErrorFunctionT< T >
 SkeletonErrorFunctionT (const Skeleton &skel, const ParameterTransform &pt)
virtual ~SkeletonErrorFunctionT ()=default
const Skeleton & getSkeleton () const
const ParameterTransform & getParameterTransform () const
virtual const Character * getCharacter () const
 For mesh-based error functions, get access to the underlying character.
void setWeight (T w)
T getWeight () const
void setActiveJoints (const VectorX< bool > &aj)
void setEnabledParameters (const ParameterSet &ps)
virtual void getHessian (const ModelParametersT< T > &, const SkeletonStateT< T > &, const MeshStateT< T > &, Eigen::Ref< Eigen::MatrixX< T > >)
virtual double getSolverDerivatives (const ModelParametersT< T > &parameters, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, const size_t actualParameters, Eigen::MatrixX< T > &hess, Eigen::VectorX< T > &grad)
virtual bool needsMesh () const
Public Member Functions inherited from momentum::FullyDifferentiableSkeletonErrorFunctionT< T >
virtual ~FullyDifferentiableSkeletonErrorFunctionT ()=default
Eigen::VectorX< T > getInput (const std::string &name) const
void getInput (const std::string &name, Eigen::Ref< Eigen::VectorX< T > > value) const
void setInput (const std::string &name, Eigen::Ref< const Eigen::VectorX< T > > value)

Additional Inherited Members

Protected Attributes inherited from momentum::SkeletonErrorFunctionT< T >
const Skeleton & skeleton_
const ParameterTransform & parameterTransform_
T weight_
VectorX< bool > activeJointParams_
ParameterSet enabledParameters_
bool useHessian_ {false}

Detailed Description

template<typename T>
class momentum::UnionErrorFunctionT< T >

Definition at line 18 of file union_error_function.h.

Constructor & Destructor Documentation

◆ UnionErrorFunctionT()

template<typename T>
momentum::UnionErrorFunctionT< T >::UnionErrorFunctionT ( const Skeleton & skel,
const ParameterTransform & pt,
const std::vector< std::shared_ptr< SkeletonErrorFunctionT< T > > > & errorFunctions )

Member Function Documentation

◆ d_gradient_d_input_dot()

template<typename T>
Eigen::VectorX< T > momentum::UnionErrorFunctionT< T >::d_gradient_d_input_dot ( const std::string & inputName,
const ModelParametersT< T > & modelParams,
const SkeletonStateT< T > & state,
Eigen::Ref< const Eigen::VectorX< T > > inputVec )
overridevirtual

◆ getError()

template<typename T>
double momentum::UnionErrorFunctionT< T >::getError ( const ModelParametersT< T > & params,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState )
nodiscardfinalvirtual

◆ getGradient()

template<typename T>
double momentum::UnionErrorFunctionT< T >::getGradient ( const ModelParametersT< T > & params,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState,
Eigen::Ref< Eigen::VectorX< T > > gradient )
finalvirtual

◆ getInputImp()

template<typename T>
void momentum::UnionErrorFunctionT< T >::getInputImp ( const std::string & name,
Eigen::Ref< Eigen::VectorX< T > > result ) const
overridevirtual

◆ getInputSize()

template<typename T>
Eigen::Index momentum::UnionErrorFunctionT< T >::getInputSize ( const std::string & name) const
overridevirtual

◆ getJacobian()

template<typename T>
double momentum::UnionErrorFunctionT< T >::getJacobian ( const ModelParametersT< T > & params,
const SkeletonStateT< T > & state,
const MeshStateT< T > & meshState,
Eigen::Ref< Eigen::MatrixX< T > > jacobian,
Eigen::Ref< Eigen::VectorX< T > > residual,
int & usedRows )
finalvirtual

◆ getJacobianSize()

template<typename T>
size_t momentum::UnionErrorFunctionT< T >::getJacobianSize ( ) const
nodiscardfinalvirtual

Reimplemented from momentum::SkeletonErrorFunctionT< T >.

Definition at line 125 of file union_error_function.cpp.

◆ inputs()

template<typename T>
std::vector< std::string > momentum::UnionErrorFunctionT< T >::inputs ( ) const
overridevirtual

◆ name()

template<typename T>
const char * momentum::UnionErrorFunctionT< T >::name ( ) const
inlineoverridevirtual

◆ setInputImp()

template<typename T>
void momentum::UnionErrorFunctionT< T >::setInputImp ( const std::string & name,
Eigen::Ref< const Eigen::VectorX< T > > value )
overridevirtual

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