Math classes and function useful in robot applications. More...
Classes | |
class | AffineException |
ignition/math/AffineException.hh More... | |
class | Angle |
An angle and related functions. More... | |
class | BiQuad |
Bi-quad filter base class. More... | |
class | BiQuadVector3 |
BiQuad vector3 filter. More... | |
class | Box |
Mathematical representation of a box and related functions. More... | |
class | Filter |
Filter base class. More... | |
class | IndexException |
Exception that is thrown when an out-of-bounds index is encountered. More... | |
class | Kmeans |
K-Means clustering algorithm. More... | |
class | Line2 |
A two dimensional line segment. More... | |
class | Matrix3 |
A 3x3 matrix class. More... | |
class | Matrix4 |
A 4x4 matrix class. More... | |
class | OnePole |
A one-pole DSP filter. More... | |
class | OnePoleQuaternion |
One-pole quaternion filter. More... | |
class | OnePoleVector3 |
One-pole vector3 filter. More... | |
class | Plane |
A plane and related functions. More... | |
class | Pose3 |
Encapsulates a position and rotation in three space. More... | |
class | Quaternion |
A quaternion class. More... | |
class | Rand |
Random number generator class. More... | |
class | RotationSpline |
Spline for rotations. More... | |
class | Spline |
Splines. More... | |
class | Triangle |
Triangle class and related functions. More... | |
class | Vector2 |
Two dimensional (x, y) vector. More... | |
class | Vector3 |
The Vector3 class represents the generic vector containing 3 elements. More... | |
class | Vector4 |
T Generic x, y, z, w vector. More... | |
Typedefs | |
typedef std::mt19937 | GeneratorType |
typedef Line2< double > | Line2d |
typedef Line2< float > | Line2f |
typedef Line2< int > | Line2i |
typedef Matrix3< double > | Matrix3d |
typedef Matrix3< float > | Matrix3f |
typedef Matrix3< int > | Matrix3i |
typedef Matrix4< double > | Matrix4d |
typedef Matrix4< float > | Matrix4f |
typedef Matrix4< int > | Matrix4i |
typedef std::normal_distribution < double > | NormalRealDist |
typedef Plane< double > | Planed |
typedef Plane< float > | Planef |
typedef Plane< int > | Planei |
typedef Pose3< double > | Pose3d |
typedef Pose3< float > | Pose3f |
typedef Pose3< int > | Pose3i |
typedef Quaternion< double > | Quaterniond |
typedef Quaternion< float > | Quaternionf |
typedef Quaternion< int > | Quaternioni |
typedef Triangle< double > | Triangled |
Double specialization of the Triangle class. More... | |
typedef Triangle< float > | Trianglef |
Float specialization of the Triangle class. More... | |
typedef Triangle< int > | Trianglei |
Integer specialization of the Triangle class. More... | |
typedef std::uniform_int_distribution < int32_t > | UniformIntDist |
typedef std::uniform_real_distribution < double > | UniformRealDist |
typedef Vector2< double > | Vector2d |
typedef Vector2< float > | Vector2f |
typedef Vector2< int > | Vector2i |
typedef Vector3< double > | Vector3d |
typedef Vector3< float > | Vector3f |
typedef Vector3< int > | Vector3i |
typedef Vector4< double > | Vector4d |
typedef Vector4< float > | Vector4f |
typedef Vector4< int > | Vector4i |
Functions | |
template<typename T > | |
T | clamp (T _v, T _min, T _max) |
Simple clamping function. More... | |
template<typename T > | |
bool | equal (const T &_a, const T &_b, const T &_epsilon=1e-6) |
check if two values are equal, within a tolerance More... | |
float | fixnan (float _v) |
Fix a nan value. More... | |
double | fixnan (double _v) |
Fix a nan value. More... | |
bool | isnan (float _v) |
check if a float is NaN More... | |
bool | isnan (double _v) |
check if a double is NaN More... | |
bool | isPowerOfTwo (unsigned int _x) |
Is this a power of 2? More... | |
template<typename T > | |
T | max (const std::vector< T > &_values) |
get the maximum value of vector of values More... | |
template<typename T > | |
T | mean (const std::vector< T > &_values) |
get mean of vector of values More... | |
template<typename T > | |
T | min (const std::vector< T > &_values) |
get the minimum value of vector of values More... | |
double | parseFloat (const std::string &_input) |
parse string into float More... | |
int | parseInt (const std::string &_input) |
parse string into an integer More... | |
template<typename T > | |
T | precision (const T &_a, const unsigned int &_precision) |
get value at a specified precision More... | |
unsigned int | roundUpPowerOfTwo (unsigned int _x) |
Get the smallest power of two that is greater or equal to a given value. More... | |
template<typename T > | |
T | variance (const std::vector< T > &_values) |
get variance of vector of values More... | |
Variables | |
static const double | NAN_D = std::numeric_limits<double>::quiet_NaN() |
Returns the representation of a quiet not a number (NAN) More... | |
static const float | NAN_F = std::numeric_limits<float>::quiet_NaN() |
Returns the representation of a quiet not a number (NAN) More... | |
static const int | NAN_I = std::numeric_limits<int>::quiet_NaN() |
Returns the representation of a quiet not a number (NAN) More... | |
Math classes and function useful in robot applications.
typedef std::mt19937 ignition::math::GeneratorType |
typedef Line2<double> ignition::math::Line2d |
typedef Line2<float> ignition::math::Line2f |
typedef Line2<int> ignition::math::Line2i |
typedef Matrix3<double> ignition::math::Matrix3d |
typedef Matrix3<float> ignition::math::Matrix3f |
typedef Matrix3<int> ignition::math::Matrix3i |
typedef Matrix4<double> ignition::math::Matrix4d |
typedef Matrix4<float> ignition::math::Matrix4f |
typedef Matrix4<int> ignition::math::Matrix4i |
typedef std::normal_distribution<double> ignition::math::NormalRealDist |
typedef Plane<double> ignition::math::Planed |
typedef Plane<float> ignition::math::Planef |
typedef Plane<int> ignition::math::Planei |
typedef Pose3<double> ignition::math::Pose3d |
typedef Pose3<float> ignition::math::Pose3f |
typedef Pose3<int> ignition::math::Pose3i |
typedef Quaternion<double> ignition::math::Quaterniond |
typedef Quaternion<float> ignition::math::Quaternionf |
typedef Quaternion<int> ignition::math::Quaternioni |
typedef Triangle<double> ignition::math::Triangled |
Double specialization of the Triangle class.
typedef Triangle<float> ignition::math::Trianglef |
Float specialization of the Triangle class.
typedef Triangle<int> ignition::math::Trianglei |
Integer specialization of the Triangle class.
typedef std::uniform_int_distribution<int32_t> ignition::math::UniformIntDist |
typedef std::uniform_real_distribution<double> ignition::math::UniformRealDist |
typedef Vector2<double> ignition::math::Vector2d |
typedef Vector2<float> ignition::math::Vector2f |
typedef Vector2<int> ignition::math::Vector2i |
typedef Vector3<double> ignition::math::Vector3d |
typedef Vector3<float> ignition::math::Vector3f |
typedef Vector3<int> ignition::math::Vector3i |
typedef Vector4<double> ignition::math::Vector4d |
typedef Vector4<float> ignition::math::Vector4f |
typedef Vector4<int> ignition::math::Vector4i |
|
inline |
|
inline |
check if two values are equal, within a tolerance
[in] | _a | the first value |
[in] | _b | the second value |
[in] | _epsilon | the tolerance |
Referenced by ignition::math::Line2< T >::Collinear(), ignition::math::Quaternion< T >::Correct(), ignition::math::Line2< T >::Intersect(), ignition::math::Matrix4< double >::IsAffine(), ignition::math::Quaternion< T >::operator!=(), ignition::math::Vector2< T >::operator==(), ignition::math::Matrix3< T >::operator==(), ignition::math::Vector4< T >::operator==(), ignition::math::Quaternion< T >::operator==(), ignition::math::Matrix4< double >::operator==(), ignition::math::Line2< T >::Parallel(), and ignition::math::Line2< T >::Slope().
|
inline |
Fix a nan value.
[in] | _v | Value to correct. |
References isnan().
|
inline |
Fix a nan value.
[in] | _v | Value to correct. |
References isnan().
|
inline |
|
inline |
check if a double is NaN
[in] | _v | the value |
Referenced by isnan().
|
inline |
Is this a power of 2?
[in] | _x | the number |
Referenced by roundUpPowerOfTwo().
|
inline |
get the maximum value of vector of values
[in] | _values | the vector of values |
References min().
Referenced by clamp(), ignition::math::Line2< T >::Intersect(), ignition::math::Box::Max(), ignition::math::Vector3< double >::Max(), min(), and ignition::math::Line2< T >::Within().
|
inline |
get mean of vector of values
[in] | _values | the vector of values |
|
inline |
get the minimum value of vector of values
[in] | _values | the vector of values |
References max().
Referenced by clamp(), ignition::math::Line2< T >::Intersect(), max(), ignition::math::Box::Min(), ignition::math::Vector3< double >::Min(), and ignition::math::Line2< T >::Within().
|
inline |
parse string into float
_input | the string |
References NAN_D.
|
inline |
parse string into an integer
[in] | _input | the string |
References NAN_I.
|
inline |
get value at a specified precision
[in] | _a | the number |
[in] | _precision | the precision |
Referenced by ignition::math::Vector3< double >::Round(), and ignition::math::Quaternion< T >::Round().
|
inline |
Get the smallest power of two that is greater or equal to a given value.
[in] | _x | the number |
References isPowerOfTwo().
|
inline |
get variance of vector of values
[in] | _values | the vector of values |
|
static |
Returns the representation of a quiet not a number (NAN)
Referenced by parseFloat(), and ignition::math::Line2< T >::Slope().
|
static |
Returns the representation of a quiet not a number (NAN)
|
static |
Returns the representation of a quiet not a number (NAN)
Referenced by parseInt().