13#include <unordered_map>
34 Eigen::Ref<Eigen::VectorX<T>> gradient)
final;
39 Eigen::Ref<Eigen::MatrixX<T>> jacobian,
40 Eigen::Ref<Eigen::VectorX<T>> residual,
44 std::vector<std::
string>
inputs() const override;
48 const
char*
name()
const override {
53 const std::string& inputName,
56 Eigen::Ref<
const Eigen::VectorX<T>> inputVec)
override;
59 std::vector<std::shared_ptr<SkeletonErrorFunctionT<T>>> errorFunctions_;
60 std::vector<std::shared_ptr<FullyDifferentiableSkeletonErrorFunctionT<T>>> diffErrorFunctions_;
64 std::unordered_map<std::string, std::vector<size_t>> inputs_;
SkeletonErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt)
void setInputImp(const std::string &name, Eigen::Ref< const Eigen::VectorX< float > > value) override
size_t getJacobianSize() const final
void getInputImp(const std::string &name, Eigen::Ref< Eigen::VectorX< float > > result) const override
UnionErrorFunctionT(const Skeleton &skel, const ParameterTransform &pt, const std::vector< std::shared_ptr< SkeletonErrorFunctionT< T > > > &errorFunctions)
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
double getGradient(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::VectorX< T > > gradient) final
Eigen::Index getInputSize(const std::string &name) const override
double getJacobian(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState, Eigen::Ref< Eigen::MatrixX< T > > jacobian, Eigen::Ref< Eigen::VectorX< T > > residual, int &usedRows) final
const char * name() const override
double getError(const ModelParametersT< T > ¶ms, const SkeletonStateT< T > &state, const MeshStateT< T > &meshState) final
std::vector< std::string > inputs() const override
SkeletonT< float > Skeleton
ParameterTransformT< float > ParameterTransform
Vector< T, Dynamic > VectorX
Dynamic-size column vector. Common return type for solver residuals and parameter vectors.
Represents the complete state of a model's mesh.
A vector of size numModelParams holding the values of all model parameters for a character.
Represents the complete state of a skeleton.