MRPT  1.9.9
math/include/mrpt/math/utils.h File Reference
#include <cstdarg>
#include <cstdio>
#include <cmath>
#include <iosfwd>
#include <vector>
#include <limits>
#include <mrpt/core/exceptions.h>
#include <mrpt/math/eigen_frwds.h>
Include dependency graph for math/include/mrpt/math/utils.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Namespaces

 mrpt
 This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries.
 
 mrpt::math
 This base provides a set of functions for maths stuff.
 

Functions

template<class T1 , class T2 >
bool mrpt::math::approximatelyEqual (T1 a, T1 b, T2 epsilon)
 Compare 2 floats and determine whether they are equal. More...
 
template<class T >
bool mrpt::math::approximatelyEqual (T a, T b)
 Compare 2 floats and determine whether they are equal. More...
 
template<class T >
mrpt::math::absDiff (const T &lhs, const T &rhs)
 Absolute difference between two numbers. More...
 
bool mrpt::math::loadVector (std::istream &f, std::vector< int > &d)
 Loads one row of a text file as a numerical std::vector. More...
 
bool mrpt::math::loadVector (std::istream &f, std::vector< double > &d)
 Loads one row of a text file as a numerical std::vector. More...
 
void mrpt::math::medianFilter (const std::vector< double > &inV, std::vector< double > &outV, const int &winSize, const int &numberOfSigmas=2)
 
template<typename T , typename VECTOR >
void mrpt::math::linspace (T first, T last, size_t count, VECTOR &out_vector)
 Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points. More...
 
template<class T , T STEP>
std::vector< T > mrpt::math::sequenceStdVec (T first, size_t length)
 Generates a sequence of values [first,first+STEP,first+2*STEP,...]. More...
 
template<class VEC1 , class VEC2 >
void mrpt::math::normalize (const VEC1 &v, VEC2 &out_v)
 Normalize a vector, such as its norm is the unity. More...
 
template<class VECTOR_OF_VECTORS , class VECTORLIKE >
void mrpt::math::extractColumnFromVectorOfVectors (const size_t colIndex, const VECTOR_OF_VECTORS &data, VECTORLIKE &out_column)
 Extract a column from a vector of vectors, and store it in another vector. More...
 
uint64_t mrpt::math::factorial64 (unsigned int n)
 Computes the factorial of an integer number and returns it as a 64-bit integer number. More...
 
double mrpt::math::factorial (unsigned int n)
 Computes the factorial of an integer number and returns it as a double value (internally it uses logarithms for avoiding overflow). More...
 
std::string mrpt::math::MATLAB_plotCovariance2D (const CMatrixFloat &cov22, const CVectorFloat &mean, const float &stdCount, const std::string &style=std::string("b"), const size_t &nEllipsePoints=30)
 Generates a string with the MATLAB commands required to plot an confidence interval (ellipse) for a 2D Gaussian ('float' version). More...
 
std::string mrpt::math::MATLAB_plotCovariance2D (const CMatrixDouble &cov22, const CVectorDouble &mean, const float &stdCount, const std::string &style=std::string("b"), const size_t &nEllipsePoints=30)
 Generates a string with the MATLAB commands required to plot an confidence interval (ellipse) for a 2D Gaussian ('double' version). More...
 
template<typename EIGEN_VECTOR , typename At , size_t N>
EIGEN_VECTOR & mrpt::math::loadVector (EIGEN_VECTOR &v, At(&theArray)[N])
 Assignment operator for initializing a std::vector from a C array (The vector will be automatically set to the correct size). More...
 
template<typename T , typename At , size_t N>
std::vector< T > & mrpt::math::loadVector (std::vector< T > &v, At(&theArray)[N])
 
template<class TRIPLET >
bool mrpt::math::saveEigenSparseTripletsToFile (const std::string &sFile, std::vector< TRIPLET > &tri)
 Saves to a plain-text file the nonzero entries of a Eigen sparse matrix, represented as a vector of triplets. More...
 



Page generated by Doxygen 1.8.14 for MRPT 1.9.9 Git: 7d5e6d718 Fri Aug 24 01:51:28 2018 +0200 at lun nov 2 08:35:50 CET 2020