15 #ifndef __IPSDKMATH_MATHUTILS_H__ 16 #define __IPSDKMATH_MATHUTILS_H__ 20 #include <boost/type_traits.hpp> 34 sort(
const T& x1,
const T& x2,
const T& x3, T& y1, T& y2, T& y3);
37 template <
typename OutputType,
typename InputType>
39 round(
const InputType value);
43 template <
typename OutputType,
typename InputType>
50 IPSDKMATH_API typename boost::enable_if<typename boost::is_arithmetic<T>::type,
bool>::type
51 compare(
const T val1,
const T val2,
52 const T tolerance = NumericLimits<T>::sqrt_epsilon());
59 IPSDKMATH_API typename boost::enable_if<typename boost::is_arithmetic<T>::type,
bool>::type
60 compare(
const std::vector<T>& vec1,
const std::vector<T>& vec2,
61 const T tolerance = NumericLimits<T>::sqrt_epsilon());
68 IPSDKMATH_API typename boost::enable_if<typename boost::is_arithmetic<T>::type,
bool>::type
70 const T tolerance = NumericLimits<T>::sqrt_epsilon());
78 IPSDKMATH_API typename boost::enable_if<typename boost::is_arithmetic<T>::type,
bool>::type
80 const T tolerance = NumericLimits<T>::sqrt_epsilon());
88 #endif // __IPSDKMATH_MATHUTILS_H__ Definition of import/export macro for library.
bool compare(const boost::numeric::ublas::matrix< ipReal64, boost::numeric::ublas::row_major, ArrayType1 > &mat1, const boost::numeric::ublas::matrix< ipReal64, boost::numeric::ublas::row_major, ArrayType2 > &mat2, const ipReal64 epsilonValue=NumericLimits< ipReal64 >::sqrt_epsilon())
matrix comparison with tolerance on frobenius norm of difference
Definition: LinearAlgebraUtils.h:148
Main namespace for IPSDK library.
Definition: AlgorithmFunctionEfficiency.h:22
IPSDKMATH_API OutputType saturatedRound(const InputType value)
function allowing to round number from a type to an other with overflow management ...
Predefined constants for ipsdk math library.
IPSDKMATH_API void sort(const T &x1, const T &x2, const T &x3, T &y1, T &y2, T &y3)
function allowing to sort 3 numbers in ascending order
Definition: MathUtils.cpp:52
#define IPSDKMATH_API
Import/Export macro for library IPSDKMath.
Definition: IPSDKMathExports.h:27
IPSDKMATH_API OutputType round(const InputType value)
function allowing to round number from a type to an other
bool compareRelative(const boost::numeric::ublas::matrix< ipReal64, boost::numeric::ublas::row_major, ArrayType1 > &mat1, const boost::numeric::ublas::matrix< ipReal64, boost::numeric::ublas::row_major, ArrayType2 > &mat2, const ipReal64 epsilonValue=NumericLimits< ipReal64 >::sqrt_epsilon())
Definition: LinearAlgebraUtils.h:161