Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
momentum::detail Namespace Reference

Classes

struct  is_compatible_to_uniform_int_distribution
struct  CollisionEllipsoidLogData
 World-space ellipsoid collision primitive data prepared for Rerun ellipsoid logging. More...
struct  CollisionBoxLogData
 World-space box collision primitive data prepared for Rerun box logging. More...

Typedefs

using DefaultException = std::runtime_error
template<typename RealType>
using UniformRealDist = std::uniform_real_distribution<RealType>
template<typename IntType>
using UniformIntDist = std::uniform_int_distribution<IntType>
template<typename RealType>
using NormalRealDist = std::normal_distribution<RealType>
template<template< typename... > class C, typename T>
using is_base_of_template = decltype(is_base_of_template_impl<C>(std::declval<T*>()))
template<typename T>
using is_base_of_matrix = is_base_of_template<Eigen::MatrixBase, T>

Functions

template<typename Exception = DefaultException, typename... Args>
void throwImpl (fmt::format_string< Args... > format, Args &&... args)
 Fallback when exceptions are disabled: write the formatted message to stderr and abort.
template<typename Exception>
void throwImpl ()
template<template< typename... > class C, typename... Ts>
std::true_type is_base_of_template_impl (const C< Ts... > *)
template<template< typename... > class C>
std::false_type is_base_of_template_impl (...)
template<typename T, typename Generator>
T generateScalarUniform (const T &min, const T &max, Generator &generator)
template<typename Derived, typename Generator>
Derived::PlainObject generateMatrixUniform (const Eigen::MatrixBase< Derived > &min, const Eigen::MatrixBase< Derived > &max, Generator &generator)
template<typename T, typename Generator>
T generateUniform (const T &min, const T &max, Generator &generator)
template<typename T, typename Generator>
T generateScalarNormal (const T &mean, const T &sigma, Generator &generator)
template<typename Derived, typename Generator>
Derived::PlainObject generateMatrixNormal (const Eigen::MatrixBase< Derived > &mean, const Eigen::MatrixBase< Derived > &sigma, Generator &generator)
template<typename T, typename Generator>
T generateNormal (const T &mean, const T &sigma, Generator &generator)
template<typename ErrorFunctionType>
size_t computeJacobianSize (const std::vector< std::shared_ptr< ErrorFunctionType > > &functions)
template<typename T>
std::vector< Eigen::Index > buildSequenceColumnIndices (const SequenceSolverFunctionT< T > *fn, size_t bandwidth)
CollisionEllipsoidLogData makeCollisionEllipsoidLogData (const CollisionGeometry &collisionGeometry, const SkeletonState &skeletonState)
 Extracts world-space ellipsoid collision geometry from the current skeleton state.
CollisionBoxLogData makeCollisionBoxLogData (const CollisionGeometry &collisionGeometry, const SkeletonState &skeletonState)
 Extracts world-space box collision geometry from the current skeleton state.

Variables

template<typename T>
constexpr bool is_compatible_to_uniform_int_distribution_v
template<typename T>
constexpr bool is_base_of_matrix_v = is_base_of_matrix<T>::value

Typedef Documentation

◆ DefaultException

using momentum::detail::DefaultException = std::runtime_error

Definition at line 60 of file exception.h.

◆ is_base_of_matrix

template<typename T>
using momentum::detail::is_base_of_matrix = is_base_of_template<Eigen::MatrixBase, T>

Definition at line 59 of file random-inl.h.

◆ is_base_of_template

template<template< typename... > class C, typename T>
using momentum::detail::is_base_of_template = decltype(is_base_of_template_impl<C>(std::declval<T*>()))

Definition at line 56 of file random-inl.h.

◆ NormalRealDist

template<typename RealType>
using momentum::detail::NormalRealDist = std::normal_distribution<RealType>

Definition at line 27 of file random-inl.h.

◆ UniformIntDist

template<typename IntType>
using momentum::detail::UniformIntDist = std::uniform_int_distribution<IntType>

Definition at line 24 of file random-inl.h.

◆ UniformRealDist

template<typename RealType>
using momentum::detail::UniformRealDist = std::uniform_real_distribution<RealType>

Definition at line 21 of file random-inl.h.

Function Documentation

◆ buildSequenceColumnIndices()

template<typename T>
std::vector< Eigen::Index > momentum::detail::buildSequenceColumnIndices ( const SequenceSolverFunctionT< T > * fn,
size_t bandwidth )

◆ computeJacobianSize()

template<typename ErrorFunctionType>
size_t momentum::detail::computeJacobianSize ( const std::vector< std::shared_ptr< ErrorFunctionType > > & functions)

Definition at line 23 of file sequence_solver_base.h.

◆ generateMatrixNormal()

template<typename Derived, typename Generator>
Derived::PlainObject momentum::detail::generateMatrixNormal ( const Eigen::MatrixBase< Derived > & mean,
const Eigen::MatrixBase< Derived > & sigma,
Generator & generator )
nodiscard

◆ generateMatrixUniform()

template<typename Derived, typename Generator>
Derived::PlainObject momentum::detail::generateMatrixUniform ( const Eigen::MatrixBase< Derived > & min,
const Eigen::MatrixBase< Derived > & max,
Generator & generator )
nodiscard

◆ generateNormal()

template<typename T, typename Generator>
T momentum::detail::generateNormal ( const T & mean,
const T & sigma,
Generator & generator )
nodiscard

◆ generateScalarNormal()

template<typename T, typename Generator>
T momentum::detail::generateScalarNormal ( const T & mean,
const T & sigma,
Generator & generator )
nodiscard

Definition at line 124 of file random-inl.h.

References is_compatible_to_uniform_int_distribution_v.

Referenced by generateMatrixNormal(), and generateNormal().

◆ generateScalarUniform()

template<typename T, typename Generator>
T momentum::detail::generateScalarUniform ( const T & min,
const T & max,
Generator & generator )
nodiscard

Definition at line 69 of file random-inl.h.

References is_compatible_to_uniform_int_distribution_v.

Referenced by generateMatrixUniform(), and generateUniform().

◆ generateUniform()

template<typename T, typename Generator>
T momentum::detail::generateUniform ( const T & min,
const T & max,
Generator & generator )
nodiscard

◆ is_base_of_template_impl() [1/2]

template<template< typename... > class C>
std::false_type momentum::detail::is_base_of_template_impl ( ...)

◆ is_base_of_template_impl() [2/2]

template<template< typename... > class C, typename... Ts>
std::true_type momentum::detail::is_base_of_template_impl ( const C< Ts... > * )

◆ makeCollisionBoxLogData()

◆ makeCollisionEllipsoidLogData()

◆ throwImpl() [1/2]

template<typename Exception>
void momentum::detail::throwImpl ( )

Definition at line 93 of file exception.h.

◆ throwImpl() [2/2]

template<typename Exception = DefaultException, typename... Args>
void momentum::detail::throwImpl ( fmt::format_string< Args... > format,
Args &&... args )

Fallback when exceptions are disabled: write the formatted message to stderr and abort.

Definition at line 86 of file exception.h.

Variable Documentation

◆ is_base_of_matrix_v

template<typename T>
bool momentum::detail::is_base_of_matrix_v = is_base_of_matrix<T>::value
inlineconstexpr

Definition at line 62 of file random-inl.h.

Referenced by generateNormal(), and generateUniform().

◆ is_compatible_to_uniform_int_distribution_v

template<typename T>
bool momentum::detail::is_compatible_to_uniform_int_distribution_v
inlineconstexpr