Simox  2.3.74.0
simox::math Namespace Reference

Data Structures

class  SoftMinMax
 The SoftMinMax class can be used to find soft min and max of a set of floats. More...
 

Functions

template<class Derived >
bool isfinite (const Eigen::MatrixBase< Derived > &mat)
 
template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t mean (iter_t first, iter_t last)
 
template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t mean (const container_t &container)
 
template<class D1 , class D2 >
meta::enable_if_vec3_vec3< D1, D2, Eigen::Vector3f > project_to_plane (const Eigen::MatrixBase< D1 > &vec, const Eigen::MatrixBase< D2 > &normal)
 
template<class Float , std::enable_if_t< std::is_floating_point_v< Float >, int > = 0>
Float rescale (Float value, Float from_lo, Float from_hi, Float to_lo, Float to_hi)
 Rescale a scalar value from interval [from_lo, from_hi] to [to_lo, to_hi]. More...
 
template<typename Float >
constexpr Float scale_value_from_to (Float val, Float from_lo, Float from_hi, Float to_lo, Float to_hi)
 
template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t sum (iter_t first, iter_t last, element_t zero)
 
template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t sum (iter_t first, iter_t last)
 
template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t sum (const container_t &container, element_t zero)
 
template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t sum (const container_t &container)
 
template<typename t >
zero ()
 

Function Documentation

◆ isfinite()

template<class Derived >
bool simox::math::isfinite ( const Eigen::MatrixBase< Derived > &  mat)

◆ mean() [1/2]

template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t simox::math::mean ( iter_t  first,
iter_t  last 
)

◆ mean() [2/2]

template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t simox::math::mean ( const container_t &  container)

◆ project_to_plane()

template<class D1 , class D2 >
meta::enable_if_vec3_vec3<D1, D2, Eigen::Vector3f> simox::math::project_to_plane ( const Eigen::MatrixBase< D1 > &  vec,
const Eigen::MatrixBase< D2 > &  normal 
)
inline

◆ rescale()

template<class Float , std::enable_if_t< std::is_floating_point_v< Float >, int > = 0>
Float simox::math::rescale ( Float  value,
Float  from_lo,
Float  from_hi,
Float  to_lo,
Float  to_hi 
)
inline

Rescale a scalar value from interval [from_lo, from_hi] to [to_lo, to_hi].

◆ scale_value_from_to()

template<typename Float >
constexpr Float simox::math::scale_value_from_to ( Float  val,
Float  from_lo,
Float  from_hi,
Float  to_lo,
Float  to_hi 
)
inline

◆ sum() [1/4]

template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t simox::math::sum ( iter_t  first,
iter_t  last,
element_t  zero 
)

◆ sum() [2/4]

template<typename iter_t , typename element_t = typename std::iterator_traits<iter_t>::value_type>
element_t simox::math::sum ( iter_t  first,
iter_t  last 
)

◆ sum() [3/4]

template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t simox::math::sum ( const container_t &  container,
element_t  zero 
)

◆ sum() [4/4]

template<typename container_t , typename element_t = typename std::iterator_traits< decltype(std::begin(std::declval<container_t>()))>::value_type>
element_t simox::math::sum ( const container_t &  container)

◆ zero()

template<typename t >
t simox::math::zero ( )