Momentum
A library for solving nonlinear optimization problems related to human body kinematics
Loading...
Searching...
No Matches
random-inl.h File Reference
#include <momentum/math/random.h>
#include <momentum/math/types.h>
#include <algorithm>
#include <limits>

Go to the source code of this file.

Classes

struct  momentum::detail::is_compatible_to_uniform_int_distribution< T >

Namespaces

namespace  momentum
namespace  momentum::detail

Typedefs

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

Functions

template<template< typename... > class C, typename... Ts>
std::true_type momentum::detail::is_base_of_template_impl (const C< Ts... > *)
template<template< typename... > class C>
std::false_type momentum::detail::is_base_of_template_impl (...)
template<typename T, typename Generator>
T momentum::detail::generateScalarUniform (const T &min, const T &max, Generator &generator)
template<typename Derived, typename Generator>
Derived::PlainObject momentum::detail::generateMatrixUniform (const Eigen::MatrixBase< Derived > &min, const Eigen::MatrixBase< Derived > &max, Generator &generator)
template<typename T, typename Generator>
T momentum::detail::generateUniform (const T &min, const T &max, Generator &generator)
template<typename T, typename Generator>
T momentum::detail::generateScalarNormal (const T &mean, const T &sigma, Generator &generator)
template<typename Derived, typename Generator>
Derived::PlainObject momentum::detail::generateMatrixNormal (const Eigen::MatrixBase< Derived > &mean, const Eigen::MatrixBase< Derived > &sigma, Generator &generator)
template<typename T, typename Generator>
T momentum::detail::generateNormal (const T &mean, const T &sigma, Generator &generator)
template<typename T>
T momentum::uniform (const T &min, const T &max)
 Convenience wrappers that forward to Random<>::GetSingleton().
template<typename FixedSizeT>
FixedSizeT momentum::uniform (typename FixedSizeT::Scalar min, typename FixedSizeT::Scalar max)
 Uniformly distributed fixed-size vector/matrix via the global Random singleton.
template<typename DynamicVector>
DynamicVector momentum::uniform (Eigen::Index size, typename DynamicVector::Scalar min, typename DynamicVector::Scalar max)
 Uniformly distributed dynamic-size vector via the global Random singleton.
template<typename DynamicMatrix>
DynamicMatrix momentum::uniform (Eigen::Index rows, Eigen::Index cols, typename DynamicMatrix::Scalar min, typename DynamicMatrix::Scalar max)
 Uniformly distributed dynamic-size matrix via the global Random singleton.
template<typename T>
Quaternion< T > momentum::uniformQuaternion ()
 Uniformly distributed unit quaternion on SO(3) via the global Random singleton.
template<typename T>
Matrix3< T > momentum::uniformRotationMatrix ()
 Uniformly distributed rotation matrix on SO(3) via the global Random singleton.
template<typename T>
Isometry3< T > momentum::uniformIsometry3 (const Vector3< T > &min=Vector3< T >::Zero(), const Vector3< T > &max=Vector3< T >::Ones())
 Random isometry on SE(3) via the global Random singleton (uniform rotation, uniform translation in [min, max]).
template<typename T>
Affine3< T > momentum::uniformAffine3 (T scaleMin=T(0.1), T scaleMax=T(10.0), const Vector3< T > &min=Vector3< T >::Zero(), const Vector3< T > &max=Vector3< T >::Ones())
 Random affine transformation via the global Random singleton (uniform rotation, uniform scale in [scaleMin, scaleMax], uniform translation in [min, max]).
template<typename T>
T momentum::normal (const T &mean, const T &sigma)
 Normally distributed value via the global Random singleton.
template<typename FixedSizeT>
FixedSizeT momentum::normal (typename FixedSizeT::Scalar mean, typename FixedSizeT::Scalar sigma)
 Normally distributed fixed-size vector/matrix via the global Random singleton.
template<typename DynamicVector>
DynamicVector momentum::normal (Eigen::Index size, typename DynamicVector::Scalar mean, typename DynamicVector::Scalar sigma)
 Normally distributed dynamic-size vector via the global Random singleton.
template<typename DynamicMatrix>
DynamicMatrix momentum::normal (Eigen::Index rows, Eigen::Index cols, typename DynamicMatrix::Scalar mean, typename DynamicMatrix::Scalar sigma)
 Normally distributed dynamic-size matrix via the global Random singleton.

Variables

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