opensurgsim
|
Implementation of isValid(), isSubnormal() and setSubnormalToZero(). More...
#include <boost/math/special_functions/fpclassify.hpp>
Go to the source code of this file.
Classes | |
class | SurgSim::Math::internal::PredicateAlwaysTrueVisitor< T, V > |
class | SurgSim::Math::internal::ValidVisitor< T > |
class | SurgSim::Math::internal::NonSubnormalVisitor< T > |
Namespaces | |
SurgSim | |
Wraps glewInit() to separate the glew opengl definitions from the osg opengl definitions only imgui needs glew but we need to call glewInit() from a osg callback, using this call we avoid getting warnings about redefinitions. | |
Functions | |
bool | SurgSim::Math::isValid (float value) |
Check if a float value is valid. More... | |
bool | SurgSim::Math::isValid (double value) |
Check if a double value is valid. More... | |
template<typename T > | |
bool | SurgSim::Math::isValid (const Eigen::DenseBase< T > &value) |
Check if a matrix or a vector is valid. More... | |
template<typename T > | |
bool | SurgSim::Math::isValid (const Eigen::QuaternionBase< T > &value) |
Check if a quaternion is valid. More... | |
template<typename T > | |
bool | SurgSim::Math::isValid (const Eigen::AngleAxis< T > &value) |
Check if an angle/axis 3D rotation is valid. More... | |
template<typename T > | |
bool | SurgSim::Math::isValid (const Eigen::Rotation2D< T > &value) |
Check if a 2D rotation is valid. More... | |
template<typename T , int D, int M, int O> | |
bool | SurgSim::Math::isValid (const Eigen::Transform< T, D, M, O > &value) |
Check if a transform is valid. More... | |
bool | SurgSim::Math::isSubnormal (float value) |
Check if a float value is subnormal. More... | |
bool | SurgSim::Math::isSubnormal (double value) |
Check if a double value is subnormal. More... | |
template<typename T > | |
bool | SurgSim::Math::isSubnormal (const Eigen::DenseBase< T > &value) |
Check if a matrix or a vector contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | SurgSim::Math::isSubnormal (const Eigen::QuaternionBase< T > &value) |
Check if a quaternion contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | SurgSim::Math::isSubnormal (const Eigen::AngleAxis< T > &value) |
Check if an angle/axis 3D rotation contains any subnormal floating-point values. More... | |
template<typename T > | |
bool | SurgSim::Math::isSubnormal (const Eigen::Rotation2D< T > &value) |
Check if a 2D rotation is described by an angle that is subnormal. More... | |
template<typename T , int D, int M, int O> | |
bool | SurgSim::Math::isSubnormal (const Eigen::Transform< T, D, M, O > &value) |
Check if a transform contains any subnormal floating-point values. More... | |
bool | SurgSim::Math::setSubnormalToZero (float *value) |
If the float value is subnormal, set it to zero. More... | |
bool | SurgSim::Math::setSubnormalToZero (double *value) |
If the double value is subnormal, set it to zero. More... | |
template<typename T > | |
bool | SurgSim::Math::setSubnormalToZero (Eigen::DenseBase< T > *value) |
Set all subnormal values in a matrix or a vector to zero. More... | |
template<typename T > | |
bool | SurgSim::Math::setSubnormalToZero (Eigen::QuaternionBase< T > *value) |
Set all subnormal values in a quaternion to zero. More... | |
template<typename T > | |
bool | SurgSim::Math::setSubnormalToZero (Eigen::AngleAxis< T > *value) |
Set all subnormal values in an angle/axis 3D rotation to zero. More... | |
template<typename T > | |
bool | SurgSim::Math::setSubnormalToZero (Eigen::Rotation2D< T > *value) |
If the angle of a 2D rotation is subnormal, set it to zero. More... | |
template<typename T , int D, int M, int O> | |
bool | SurgSim::Math::setSubnormalToZero (Eigen::Transform< T, D, M, O > *value) |
Set all subnormal values in a transform to zero. More... | |
Implementation of isValid(), isSubnormal() and setSubnormalToZero().
|
inline |
Check if a float
value is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<float>::denorm_min() <= x < std::numeric_limits<float>::min()
, and can result in very slow floating point calculations under some conditions.
value | the value to check. |
|
inline |
Check if a double
value is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<double>::denorm_min() <= x < std::numeric_limits<double>::min()
, and can result in very slow floating point calculations under some conditions.
value | the value to check. |
|
inline |
Check if a matrix or a vector contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
value | the matrix or vector value to check. |
|
inline |
Check if a quaternion contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the quaternion. Can usually be deduced. |
value | the quaternion value to check. |
|
inline |
Check if an angle/axis 3D rotation contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a 2D rotation is described by an angle that is subnormal.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the 2D rotation value to check. |
|
inline |
Check if a transform contains any subnormal floating-point values.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the transform. Can usually be deduced. |
D | the dimension used to describe the transform. Can usually be deduced. |
M | the mode value used to describe the transform. Can usually be deduced. |
O | the options value used to describe the transform. Can usually be deduced. |
value | the transform value to check. |
|
inline |
Check if a float
value is valid.
Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
value | the value to check. |
|
inline |
Check if a double
value is valid.
Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
value | the value to check. |
|
inline |
Check if a matrix or a vector is valid.
These quantities are valid if all of their elements are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
value | the matrix or vector value to check. |
|
inline |
Check if a quaternion is valid.
Quaternions are valid if all of their components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the base type used to describe the quaternion. Can usually be deduced. |
value | the quaternion value to check. |
|
inline |
Check if an angle/axis 3D rotation is valid.
Angle/axis rotations are valid if the angle and the axis components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a 2D rotation is valid.
2D rotations are valid if the rotation angle is valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the rotation. Can usually be deduced. |
value | the rotation value to check. |
|
inline |
Check if a transform is valid.
Transforms are valid if all of their components are valid. Zero, subnormal and normal numbers are valid; infinities and NaNs are not.
T | the scalar type used to describe the transform. Can usually be deduced. |
D | the dimension used to describe the transform. Can usually be deduced. |
M | the mode value used to describe the transform. Can usually be deduced. |
O | the options value used to describe the transform. Can usually be deduced. |
value | the transform value to check. |
|
inline |
If the float
value is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<float>::denorm_min() <= x < std::numeric_limits<float>::min()
, and can result in very slow floating point calculations under some conditions.
[in,out] | value | the value to check and possibly modify. |
|
inline |
If the double
value is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<double>::denorm_min() <= x < std::numeric_limits<double>::min()
, and can result in very slow floating point calculations under some conditions.
[in,out] | value | the value to check and possibly modify. |
|
inline |
Set all subnormal values in a matrix or a vector to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the matrix or vector. Can usually be deduced. |
[in,out] | value | the matrix or vector value to check and possibly modify. |
|
inline |
Set all subnormal values in a quaternion to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the quaternion. Can usually be deduced. |
[in,out] | value | the quaternion value to check and possibly modify. |
|
inline |
Set all subnormal values in an angle/axis 3D rotation to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
[in,out] | value | the rotation value to check and possibly modify. |
|
inline |
If the angle of a 2D rotation is subnormal, set it to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the scalar type used to describe the rotation. Can usually be deduced. |
[in,out] | value | the rotation value to check and possibly modify. |
|
inline |
Set all subnormal values in a transform to zero.
Subnormal values have absolute values in the range std::numeric_limits<T>::denorm_min() <= x < std::numeric_limits<T>::min()
, and can result in very slow floating point calculations under some conditions.
T | the base type used to describe the transform. Can usually be deduced. |
[in,out] | value | the transform value to check and possibly modify. |