MRPT  2.0.4
Namespaces | Functions
math/include/mrpt/math/utils.h File Reference
#include <mrpt/core/exceptions.h>
#include <mrpt/math/CMatrixDynamic.h>
#include <mrpt/math/CVectorDynamic.h>
#include <mrpt/math/math_frwds.h>
#include <cmath>
#include <cstdarg>
#include <cstdio>
#include <iosfwd>
#include <limits>
#include <vector>
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, int winSize, 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, float stdCount, const std::string &style=std::string("b"), 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, float stdCount, const std::string &style=std::string("b"), 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 VECTOR_T , typename At , size_t N>
VECTOR_T & mrpt::math::loadVector (VECTOR_T &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 2.0.4 Git: 33de1d0ad Sat Jun 20 11:02:42 2020 +0200 at sáb jun 20 17:35:17 CEST 2020