This base provides a set of functions for maths stuff. More...
Namespaces | |
| namespace | detail |
Classes | |
| class | CArray |
| A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most likely prefer to use CArrayPOD and its derived classes instead. More... | |
| class | CArray< T, 0 > |
| class | CArrayPOD |
| A CArray for Plain Old Datatypes (POD), that is, int's, double's, etc or struct's with only PODs. More... | |
| class | CArrayNumeric |
| A CArrayPOD for numeric types, supporting several mathematical operations. More... | |
| class | CArrayFloat |
| A partial specialization of CArrayNumeric for float numbers. More... | |
| class | CArrayDouble |
| A partial specialization of CArrayNumeric for double numbers. More... | |
| class | CArrayInt |
| A partial specialization of CArrayNumeric for int numbers. More... | |
| class | CArrayUInt |
| A partial specialization of CArrayNumeric for unsigned int numbers. More... | |
| class | CAStarAlgorithm |
| This class is intended to efficiently solve graph-search problems using heuristics to determine the best path. More... | |
| class | CBinaryRelation |
| This class models a binary relation through the elements of any given set. More... | |
| class | CGraphPartitioner |
| Algorithms for finding the min-normalized-cut of a weighted undirected graph. More... | |
| class | CHistogram |
| This class provides an easy way of computing histograms for unidimensional real valued variables. More... | |
| class | CLevenbergMarquardtTempl |
| An implementation of the Levenberg-Marquardt algorithm for least-square minimization. More... | |
| class | CMatrix |
| This class is a "CSerializable" wrapper for "CMatrixFloat". More... | |
| class | CMatrixB |
| This class is a "CSerializable" wrapper for "CMatrixBool". More... | |
| class | CMatrixD |
| This class is a "CSerializable" wrapper for "CMatrixTemplateNumeric<double>". More... | |
| class | CMatrixFixedNumeric |
| A numeric matrix of compile-time fixed size. More... | |
| class | CMatrixTemplate |
| This template class provides the basic functionality for a general 2D any-size, resizable container of numerical or non-numerical elements. More... | |
| class | AccessorIterator |
| Template class for matrix accessor's iterators. More... | |
| class | ReverseAccessorIterator |
| Template class for matrix accessor's iterators. More... | |
| class | CMatrixColumnAccessor |
| A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator. More... | |
| class | CMatrixColumnAccessorExtended |
| A vector-like wrapper for a Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing. More... | |
| class | CConstMatrixColumnAccessor |
| A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] operator. More... | |
| class | CConstMatrixColumnAccessorExtended |
| A vector-like wrapper for a const Matrix for accessing the elements of a given column with a [] operator, with offset and custom spacing. More... | |
| class | CMatrixRowAccessor |
| A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator. More... | |
| class | CMatrixRowAccessorExtended |
| A vector-like wrapper for a Matrix for accessing the elements of a given row with a [] operator, with offset and custom spacing. More... | |
| class | CConstMatrixRowAccessor |
| A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator. More... | |
| class | CConstMatrixRowAccessorExtended |
| A vector-like wrapper for a const Matrix for accessing the elements of a given row with a [] operator, with offset and custom spacing. More... | |
| class | CMatrixTemplateNumeric |
| This template class extends the class "CMatrixTemplate" with many common operations with numerical matrixes. More... | |
| class | CMatrixTemplateObjects |
| This template class extends the class "CMatrixTemplate" for storing "objects" at each matrix entry. More... | |
| class | CPolygon |
| A wrapper of a TPolygon2D class, implementing CSerializable. More... | |
| class | CQuaternion |
| General functions for quaternion. More... | |
| class | CSparseMatrixTemplate |
| A sparse matrix container (with cells of any type), with iterators. More... | |
| class | CSparseSymmetricalMatrix |
| A sparse matrix container for square symmetrical content around the main diagonal. More... | |
| class | CSplineInterpolator1D |
| A (persistent) sequence of (x,y) coordinates, allowing queries of intermediate points through spline interpolation, where possible. More... | |
| class | CVectorTemplate |
| This template class provides the basic functionality for a general 1D any-size, resizable container of numerical or non-numerical elements. More... | |
| class | CDijkstra |
| The Dijkstra algorithm for finding the shortest path between a given source node in a (weighted) directed graph and all other nodes. More... | |
| class | TPolygonWithPlane |
| Slightly heavyweight type to speed-up calculations with polygons in 3D. More... | |
| class | CDirectedGraph |
| A directed graph with the argument of the template specifying the type of the annotations in the edges. More... | |
| struct | TPoint2D |
| Lightweight 2D point. More... | |
| struct | TPose2D |
| Lightweight 2D pose. More... | |
| struct | TPoint3D |
| Lightweight 3D point. More... | |
| struct | TPose3D |
| Lightweight 3D pose (three spatial coordinates, plus three angular coordinates). More... | |
| struct | TSegment2D |
| 2D segment, consisting of two points. More... | |
| struct | TSegment3D |
| 3D segment, consisting of two points. More... | |
| struct | TLine2D |
2D line without bounds, represented by its equation . More... | |
| struct | TLine3D |
| 3D line, represented by a base point and a director vector. More... | |
| struct | TPlane |
3D Plane, represented by its equation More... | |
| class | TPolygon2D |
| 2D polygon, inheriting from std::vector<TPoint2D>. More... | |
| class | TPolygon3D |
| 3D polygon, inheriting from std::vector<TPoint3D> More... | |
| struct | TObject2D |
| Standard type for storing any lightweight 2D type. More... | |
| struct | TObject3D |
| Standard object for storing any 3D lightweight object. More... | |
| class | RANSAC_Template |
Typedefs | |
| typedef CLevenbergMarquardtTempl < double > | CLevenbergMarquardt |
| The default name for the LM class is an instantiation for "double". | |
| typedef CMatrixTemplateNumeric < float > | CMatrixFloat |
| Declares a matrix of float numbers (non serializable). | |
| typedef CMatrixTemplateNumeric < double > | CMatrixDouble |
| Declares a matrix of double numbers (non serializable). | |
| typedef CMatrixTemplateNumeric < unsigned int > | CMatrixUInt |
| Declares a matrix of unsigned ints (non serializable). | |
| typedef CMatrixTemplate< bool > | CMatrixBool |
| Declares a matrix of booleans (non serializable). | |
| typedef CMatrixTemplateNumeric < double > | CMatrixLongDouble |
| Declares a matrix of "long doubles" (non serializable), or of "doubles" if the compiler does not support "long double". | |
| typedef CQuaternion< double > | CQuaternionDouble |
| A quaternion of data type "double". | |
| typedef CQuaternion< float > | CQuaternionFloat |
| A quaternion of data type "float". | |
| typedef CVectorTemplate< float > | CVectorFloat |
| Declares a vector of float elements. | |
| typedef CVectorTemplate< double > | CVectorDouble |
| Declares a vector of double elements. | |
| typedef RANSAC_Template< double > | RANSAC |
| The default instance of RANSAC, for double type. | |
Typedefs for common sizes | |
| typedef CMatrixFixedNumeric < double, 2, 2 > | CMatrixDouble22 |
| typedef CMatrixFixedNumeric < double, 3, 3 > | CMatrixDouble33 |
| typedef CMatrixFixedNumeric < double, 4, 4 > | CMatrixDouble44 |
| typedef CMatrixFixedNumeric < double, 6, 6 > | CMatrixDouble66 |
| typedef CMatrixFixedNumeric < double, 1, 3 > | CMatrixDouble13 |
| typedef CMatrixFixedNumeric < double, 3, 1 > | CMatrixDouble31 |
| typedef CMatrixFixedNumeric < double, 1, 2 > | CMatrixDouble12 |
| typedef CMatrixFixedNumeric < double, 2, 1 > | CMatrixDouble21 |
| typedef CMatrixFixedNumeric < double, 6, 1 > | CMatrixDouble61 |
| typedef CMatrixFixedNumeric < double, 1, 6 > | CMatrixDouble16 |
| typedef CMatrixFixedNumeric < float, 2, 2 > | CMatrixFloat22 |
| typedef CMatrixFixedNumeric < float, 3, 3 > | CMatrixFloat33 |
| typedef CMatrixFixedNumeric < float, 4, 4 > | CMatrixFloat44 |
| typedef CMatrixFixedNumeric < float, 6, 6 > | CMatrixFloat66 |
| typedef CMatrixFixedNumeric < float, 1, 3 > | CMatrixFloat13 |
| typedef CMatrixFixedNumeric < float, 3, 1 > | CMatrixFloat31 |
| typedef CMatrixFixedNumeric < float, 1, 2 > | CMatrixFloat12 |
| typedef CMatrixFixedNumeric < float, 2, 1 > | CMatrixFloat21 |
| typedef CMatrixFixedNumeric < float, 6, 1 > | CMatrixFloat61 |
| typedef CMatrixFixedNumeric < float, 1, 6 > | CMatrixFloat16 |
Enumerations | |
| enum | TMatrixTextFileFormat { MATRIX_FORMAT_ENG = 0, MATRIX_FORMAT_FIXED = 1, MATRIX_FORMAT_INT = 2 } |
Selection of the number format in CMatrixTemplate::saveToTextFile. More... | |
Functions | |
| bool MRPTDLLIMPEXP | isNan (float v) |
| Returns true if value is Not-a-number (NAN). | |
| bool MRPTDLLIMPEXP | isNan (double v) |
| Returns true if value is Not-a-number (NAN). | |
| bool MRPTDLLIMPEXP | isFinite (float v) |
| Returns true if value is finite. | |
| bool MRPTDLLIMPEXP | isFinite (double v) |
| Returns true if value is finite. | |
| template<class T , std::size_t N> | |
| bool | operator== (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<class T , std::size_t N> | |
| bool | operator< (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<class T , std::size_t N> | |
| bool | operator!= (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<class T , std::size_t N> | |
| bool | operator> (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<class T , std::size_t N> | |
| bool | operator<= (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<class T , std::size_t N> | |
| bool | operator>= (const CArray< T, N > &x, const CArray< T, N > &y) |
| template<typename MAT_H , typename MAT_C , typename MAT_R > | |
| void | multiply_HCHt (const MAT_H &H, const MAT_C &C, MAT_R &R, bool accumResultInOutput, bool allow_submatrix_mult) |
| The generic function which allow mixing any kind of matrices. | |
| template<typename T , size_t N, size_t M> | |
| void | multiply_HtCH (const CMatrixFixedNumeric< T, M, N > &H, const CMatrixFixedNumeric< T, M, M > &C, CMatrixFixedNumeric< T, N, N > &R, bool accumResultInOutput) |
| Use the member method with the same name in matrix classes. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | invMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, CMatrixFixedNumeric< T, NROWS, NCOLS > &out_inv) |
| Returns the inverse of the matrix in "out_inv". | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | invMatrix_destroySrc (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, CMatrixFixedNumeric< T, NROWS, NCOLS > &out_inv) |
| Returns the inverse of the matrix in "out_inv" , DESTROYING the original matrix M. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | multiply (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val) |
| Multiply by scalar. | |
| template<typename T , size_t NROWS, size_t NCOLS, size_t M1C> | |
| void | multiply (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2, CMatrixFixedNumeric< T, NROWS, NCOLS > &RESULT) |
| Multiply 2 matrices: RESULT = m1 * m2. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | multiply_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val) |
| template<typename T , size_t NROWS, size_t NCOLS, size_t M1C> | |
| void | multiply_SIMD (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2, CMatrixFixedNumeric< T, NROWS, NCOLS > &RESULT) |
| template<typename T , size_t M1R, size_t M1C> | |
| void | multiply_AAt (const CMatrixFixedNumeric< T, M1R, M1C > &m1, CMatrixFixedNumeric< T, M1R, M1R > &RESULT) |
| Multiply 2 matrices: RESULT = A * A^t. | |
| template<typename T , size_t N, size_t M> | |
| void | multiply_Ab (const CMatrixFixedNumeric< T, N, M > &A, const std::vector< T > &a, std::vector< T > &out_v) |
| Computes the vector v = A * a, where "a" is a column vector of the appropriate length. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | sumInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val) |
| Sum a scalar to all elements. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | sumInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &m, const T val) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | sumInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A) |
| Sum two matrices: M+=A. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | sumInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | substractInPlace (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A) |
| Sum two matrices: M-=A. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | substractInPlace_SIMD (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CMatrixFixedNumeric< T, NROWS, NCOLS > &A) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | sumMatrixAllElements (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| Sum all the elements in the matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | sumMatrixAllElements_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | minimumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| Sum all the elements in the matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | minimumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | maximumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| Sum all the elements in the matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | maximumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | minimumAndMaximumMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, T &val_min, T &val_max) |
| Sum all the elements in the matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | minimumAndMaximumMatrix_SIMD (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M, T &val_min, T &val_max) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| T | detMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| Returns the determinant of the matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | sqrtMatrix (CMatrixFixedNumeric< T, NROWS, NCOLS > &M) |
| Returns the determinant of the matrix. | |
| template<typename T , size_t N> | |
| void | eigenVectorsMatrix (const CMatrixFixedNumeric< T, N, N > &M, CMatrixFixedNumeric< T, N, N > &Z, CMatrixFixedNumeric< T, N, N > &D) |
| Used from the method from CMatrix classes instead. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | sum (const CMatrixFixedNumeric< T, NROWS, NCOLS > &A, const CMatrixFixedNumeric< T, NROWS, NCOLS > &B) |
| Return the sum of two matrices: RET = A+B. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | substract (const CMatrixFixedNumeric< T, NROWS, NCOLS > &A, const CMatrixFixedNumeric< T, NROWS, NCOLS > &B) |
| Return the sum of two matrices: RET = A-B. | |
| template<typename T , size_t N, size_t M> | |
| void | multiply_HCHt (const CMatrixFixedNumeric< T, N, M > &H, const CMatrixTemplateNumeric< T > &C, CMatrixTemplateNumeric< T > &R, bool resizeOutputR, bool accumResultInOutput) |
| Computes R = HCH^t, with optional index offsets in C and R. | |
| template<class MAT_X , class MAT_A , class MAT_OUT > | |
| void | multiplySubMatrix (const MAT_X &X, const MAT_A &A, MAT_OUT &outResult, const size_t &A_cols_offset, const size_t &A_rows_offset, const size_t &A_col_count) |
| Matrix multiplication of this matrix with a submatrix of 'A', saving the result in a third matrix. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | operator* (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const T v) |
| Multiply a matrix by a scalar. | |
| template<typename T , size_t NROWS, size_t NCOLS, size_t M1C> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | operator* (const CMatrixFixedNumeric< T, NROWS, M1C > &m1, const CMatrixFixedNumeric< T, M1C, NCOLS > &m2) |
| Multiply 2 matrices with the * operator. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | operator+ (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m2) |
| Add 2 matrices with the + operator. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > | operator- (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m2) |
| Substract 2 matrices with the - operator. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NCOLS, NROWS > | operator- (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m) |
| unary negative operator - | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NCOLS, NROWS > | operator~ (const CMatrixFixedNumeric< T, NROWS, NCOLS > &m) |
| unary transpose operator ~ | |
| template<typename T , size_t NROWS> | |
| CMatrixFixedNumeric< T, NROWS, NROWS > | operator! (const CMatrixFixedNumeric< T, NROWS, NROWS > &m) |
| unary inverse operator ! | |
| template<typename T > | |
| void MRPTDLLIMPEXP | tred2 (T **a, size_t nn, T d[], T e[]) |
| template<class T > | |
| void MRPTDLLIMPEXP | tqli (T d[], T e[], size_t nn, T **z) |
| template<typename T > | |
| void MRPTDLLIMPEXP | eigenVectorsMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &Z, CMatrixFixedNumeric< T, 2, 2 > &D) |
| Used from the method from CMatrix classes instead. | |
| template<typename T > | |
| T | detMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M) |
| Returns the determinant of the matrix. | |
| template<typename T > | |
| T | detMatrix (const CMatrixFixedNumeric< T, 3, 3 > &M) |
| Returns the determinant of the matrix DET = a11(a33a22-a32a23)-a21(a33a12-a32a13)+a31(a23a12-a22a13). | |
| template<typename T > | |
| T | detMatrix (const CMatrixFixedNumeric< T, 4, 4 > &M) |
| Returns the determinant of the matrix. | |
| template<typename T > | |
| void | invMatrix (const CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &out_inv) |
| Returns the inverse of the matrix in "out_inv". | |
| template<typename T > | |
| void | invMatrix_destroySrc (CMatrixFixedNumeric< T, 2, 2 > &M, CMatrixFixedNumeric< T, 2, 2 > &out_inv) |
| template<typename T > | |
| void | invMatrix (const CMatrixFixedNumeric< T, 3, 3 > &M, CMatrixFixedNumeric< T, 3, 3 > &out_inv) |
| Returns the inverse of the matrix in "out_inv". | |
| template<typename T > | |
| void | invMatrix_destroySrc (CMatrixFixedNumeric< T, 3, 3 > &M, CMatrixFixedNumeric< T, 3, 3 > &out_inv) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | fixedToDynMatrix (const CMatrixFixedNumeric< T, NROWS, NCOLS > &SRC, CMatrixTemplateNumeric< T > &DST) |
| Auxiliary function used in the constructor of dyn. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | insertMatrixFixTransposeIntoDyn (CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, const CMatrixFixedNumeric< T, NROWS, NCOLS > &in) |
| Auxiliary function used in CMatrixTemplate. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | insertMatrixFixIntoDyn (CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, const CMatrixFixedNumeric< T, NROWS, NCOLS > &in) |
| Auxiliary function used in CMatrixTemplate. | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| void | extractFixMatrixFromDynMatrix (const CMatrixTemplate< T > &M, const size_t nRow, const size_t nCol, CMatrixFixedNumeric< T, NROWS, NCOLS > &outMat) |
| Used from CMatrixTemplate::extractMatrix. | |
| template<typename T , size_t N, size_t M> | |
| CMatrixTemplateNumeric< T > & | add (CMatrixTemplateNumeric< T > &A, const CMatrixFixedNumeric< T, N, M > &B) |
| template<typename T , size_t N, size_t M> | |
| CMatrixTemplateNumeric< T > & | substract (CMatrixTemplateNumeric< T > &A, const CMatrixFixedNumeric< T, N, M > &B) |
| template<typename T , typename VECTORLIKE , size_t DIM> | |
| T | multiply_HCHt_scalar (const VECTORLIKE &H, const CMatrixFixedNumeric< T, DIM, DIM > &C) |
| A special case of multiply_HCHt for the case of the resulting matrix being a scalar (that is, a 1x1 matrix) - This method directly returns this as a scalar avoiding the construction of a 1x1 matrix. | |
| template<size_t NROWS, size_t NCOLS> | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, CMatrixFixedNumeric< float, NROWS, NCOLS > &M) |
| Read operator from a CStream. | |
| template<size_t NROWS, size_t NCOLS> | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, CMatrixFixedNumeric< double, NROWS, NCOLS > &M) |
| Read operator from a CStream. | |
| template<size_t NROWS, size_t NCOLS> | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const CMatrixFixedNumeric< float, NROWS, NCOLS > &M) |
| Write operator for writing into a CStream. | |
| template<size_t NROWS, size_t NCOLS> | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const CMatrixFixedNumeric< double, NROWS, NCOLS > &M) |
| Write operator for writing into a CStream. | |
| template<class T , size_t NROWS, size_t NCOLS> | |
| std::ostream & | operator<< (std::ostream &ostrm, const CMatrixFixedNumeric< T, NROWS, NCOLS > &m) |
| Textual output stream function. | |
| template<class T , size_t NROWS, size_t NCOLS> | |
| bool | operator== (const CMatrixFixedNumeric< T, NROWS, NCOLS > &M1, const CMatrixFixedNumeric< T, NROWS, NCOLS > &M2) |
| Equal comparison (==). | |
| template<typename U > | |
| U | myStaticCast (double val) |
| template<> | |
| bool | myStaticCast (double val) |
| template<class MAT > | |
| void | saveMatrixToTextFile (const MAT &theMatrix, const std::string &file, TMatrixTextFileFormat fileFormat, bool appendMRPTHeader, const std::string &userHeader) |
| Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classes themselves). | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &ostrm, const CMatrixTemplate< T > &m) |
| Textual output stream function. | |
| template<class T > | |
| size_t | size (const CMatrixTemplate< T > &m, int dim) |
| Returns the size of the matrix in the i'th dimension: 1=rows, 2=columns (MATLAB-compatible function). | |
| template<typename T > | |
| void | getAsVectorOfAccessors (CMatrixTemplate< T > &mat, std::vector< CMatrixRowAccessor< T > > &vec) |
| This algorithm transforms a matrix into a vector of accessors. | |
| template<typename T > | |
| void | getAsVectorOfAccessors (const CMatrixTemplate< T > &mat, std::vector< CConstMatrixRowAccessor< T > > &vec) |
| This algorithm transforms a matrix into a vector of accessors. | |
| template<typename T > | |
| void | getTransposedAsVectorOfAccessors (CMatrixTemplate< T > &mat, std::vector< CMatrixColumnAccessor< T > > &vec) |
| This algorithm transforms a matrix into a vector of accessors. | |
| template<typename T > | |
| void | getTransposedAsVectorOfAccessors (const CMatrixTemplate< T > &mat, std::vector< CConstMatrixColumnAccessor< T > > &vec) |
| This algorithm transforms a matrix into a vector of accessors. | |
| template<class T > | |
| bool | operator== (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| Logical equal-to operator. | |
| template<class T > | |
| bool | operator!= (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| logical no-equal-to operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator+ (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| binary addition operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator- (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| binary subtraction operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator* (const CMatrixTemplateNumeric< T > &m, const T &no) |
| binary scalar multiplication operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator* (const T &no, const CMatrixTemplateNumeric< T > &m) |
| binary scalar multiplication operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator* (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| binary matrix multiplication operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator* (const CMatrixTemplateNumeric< T > &m1, const CVectorTemplate< T > &m2) |
| Binary matrix multiplication operator, with one matrix being NxM and the second being a column matrix Mx1. | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator/ (const CMatrixTemplateNumeric< T > &m, const T &no) |
| binary scalar division operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator/ (const T &no, const CMatrixTemplateNumeric< T > &m) |
| binary scalar division operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator/ (const CMatrixTemplateNumeric< T > &m1, const CMatrixTemplateNumeric< T > &m2) |
| binary matrix division operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator^ (const CMatrixTemplateNumeric< T > &m, const unsigned int &pow) |
| binary power operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator~ (const CMatrixTemplateNumeric< T > &m) |
| unary transpose operator | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | operator! (const CMatrixTemplateNumeric< T > &m) |
| Unary inversion operator. | |
| template<class T > | |
| T MRPTDLLIMPEXP | multiply_HCHt_scalar (const std::vector< T > &H, const CMatrixTemplateNumeric< T > &C) |
| An special case of multiply_HCHt for the case of the resulting matrix being a scalar (that is, a 1x1 matrix) - This method directly returns this as a scalar avoiding the construction of a 1x1 matrix. | |
| bool MRPTDLLIMPEXP | traceRay (const vector< TPolygonWithPlane > &vec, const mrpt::poses::CPose3D &pose, double &dist) |
| Fast ray tracing method using polygons' properties. | |
| bool | traceRay (const vector< TPolygon3D > &vec, const mrpt::poses::CPose3D &pose, double &dist) |
| Fast ray tracing method using polygons' properties. | |
| template<class T , class U , class V > | |
| void | crossProduct3D (const T &v0, const U &v1, V &vOut) |
| Computes the cross product of two 3D vectors, returning a vector normal to both. | |
| template<class T > | |
| void | crossProduct3D (const std::vector< T > &v0, const std::vector< T > &v1, std::vector< T > &v_out) |
| Computes the cross product of two 3D vectors, returning a vector normal to both. | |
| template<class T , class U > | |
| bool | vectorsAreParallel2D (const T &v1, const U &v2) |
| Returns true if two 2D vectors are parallel. | |
| template<class T , class U > | |
| bool | vectorsAreParallel3D (const T &v1, const U &v2) |
| Returns true if two 3D vectors are parallel. | |
| double MRPTDLLIMPEXP | minimumDistanceFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y) |
| Computes the closest point from a given point to a segment, and returns that minimum distance. | |
| double MRPTDLLIMPEXP | minimumDistanceFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, float &out_x, float &out_y) |
| Computes the closest point from a given point to a segment, and returns that minimum distance. | |
| void MRPTDLLIMPEXP | closestFromPointToSegment (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y) |
| Computes the closest point from a given point to a segment. | |
| void MRPTDLLIMPEXP | closestFromPointToLine (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2, double &out_x, double &out_y) |
| Computes the closest point from a given point to a (infinite) line. | |
| double MRPTDLLIMPEXP | closestSquareDistanceFromPointToLine (const double &Px, const double &Py, const double &x1, const double &y1, const double &x2, const double &y2) |
| Returns the square distance from a point to a line. | |
| template<typename T > | |
| T | distanceBetweenPoints (const T x1, const T y1, const T x2, const T y2) |
| Returns the distance between 2 points in 2D. | |
| template<typename T > | |
| T | distanceBetweenPoints (const T x1, const T y1, const T z1, const T x2, const T y2, const T z2) |
| Returns the distance between 2 points in 3D. | |
| template<typename T > | |
| T | distanceSqrBetweenPoints (const T x1, const T y1, const T x2, const T y2) |
| Returns the square distance between 2 points in 2D. | |
| template<typename T > | |
| T | distanceSqrBetweenPoints (const T x1, const T y1, const T z1, const T x2, const T y2, const T z2) |
| Returns the square distance between 2 points in 3D. | |
| bool MRPTDLLIMPEXP | SegmentsIntersection (const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const double &x4, const double &y4, double &ix, double &iy) |
| Returns the intersection point, and if it exists, between two segments. | |
| bool MRPTDLLIMPEXP | SegmentsIntersection (const double &x1, const double &y1, const double &x2, const double &y2, const double &x3, const double &y3, const double &x4, const double &y4, float &ix, float &iy) |
| Returns the intersection point, and if it exists, between two segments. | |
| bool MRPTDLLIMPEXP | pointIntoPolygon2D (const double &px, const double &py, unsigned int polyEdges, const double *poly_xs, const double *poly_ys) |
| Returns true if the 2D point (px,py) falls INTO the given polygon. | |
| template<typename T > | |
| bool | pointIntoQuadrangle (T x, T y, T v1x, T v1y, T v2x, T v2y, T v3x, T v3y, T v4x, T v4y) |
| Specialized method to check whether a point (x,y) falls into a quadrangle. | |
| double MRPTDLLIMPEXP | distancePointToPolygon2D (const double &px, const double &py, unsigned int polyEdges, const double *poly_xs, const double *poly_ys) |
| Returns the closest distance of a given 2D point to a polygon, or "0" if the point is INTO the polygon or its perimeter. | |
| bool MRPTDLLIMPEXP | minDistBetweenLines (const double &p1_x, const double &p1_y, const double &p1_z, const double &p2_x, const double &p2_y, const double &p2_z, const double &p3_x, const double &p3_y, const double &p3_z, const double &p4_x, const double &p4_y, const double &p4_z, double &x, double &y, double &z, double &dist) |
| Calculates the minimum distance between a pair of lines. | |
| bool MRPTDLLIMPEXP | RectanglesIntersection (const double &R1_x_min, const double &R1_x_max, const double &R1_y_min, const double &R1_y_max, const double &R2_x_min, const double &R2_x_max, const double &R2_y_min, const double &R2_y_max, const double &R2_pose_x, const double &R2_pose_y, const double &R2_pose_phi) |
| Returns wether two rotated rectangles intersect. | |
| template<class T > | |
| CMatrixTemplateNumeric< T > | generateAxisBaseFromDirection (T dx, T dy, T dz) |
| Computes an axis base (a set of three 3D normal vectors) with the given vector being the first of them. | |
| TPoint3D | operator- (const TPoint3D &p1) |
| Unary minus operator for 3D points. | |
| TPoint3D | operator+ (const TPoint3D &p1, const TPoint3D &p2) |
| Sum operator for 3D points. | |
| TPoint3D | operator- (const TPoint3D &p1, const TPoint3D &p2) |
| Substract operator for 3D points. | |
| bool | operator== (const TPoint2D &p1, const TPoint2D &p2) |
| Exact comparison between 2D points. | |
| bool | operator!= (const TPoint2D &p1, const TPoint2D &p2) |
| Exact comparison between 2D points. | |
| bool | operator== (const TPoint3D &p1, const TPoint3D &p2) |
| Exact comparison between 3D points. | |
| bool | operator!= (const TPoint3D &p1, const TPoint3D &p2) |
| Exact comparison between 3D points. | |
| bool | operator== (const TPose2D &p1, const TPose2D &p2) |
| Exact comparison between 2D poses, taking possible cycles into account. | |
| bool | operator!= (const TPose2D &p1, const TPose2D &p2) |
| Exact comparison between 2D poses, taking possible cycles into account. | |
| bool | operator== (const TPose3D &p1, const TPose3D &p2) |
| Exact comparison between 3D poses, taking possible cycles into account. | |
| bool | operator!= (const TPose3D &p1, const TPose3D &p2) |
| Exact comparison between 3D poses, taking possible cycles into account. | |
| bool | operator== (const TSegment2D &s1, const TSegment2D &s2) |
| bool | operator!= (const TSegment2D &s1, const TSegment2D &s2) |
| bool | operator== (const TSegment3D &s1, const TSegment3D &s2) |
| bool | operator!= (const TSegment3D &s1, const TSegment3D &s2) |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TPoint2D &o) |
| TPoint2D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TPoint2D &o) |
| TPoint2D binary output. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TPoint3D &o) |
| TPoint3D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TPoint3D &o) |
| TPoint3D binary output. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TPose2D &o) |
| TPose2D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TPose2D &o) |
| TPose2D binary output. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TPose3D &o) |
| TPose3D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TPose3D &o) |
| TPose3D binary output. | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TSegment2D &s) |
| TSegment2D binary input. | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TSegment2D &s) |
| TSegment2D binary output. | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TLine2D &l) |
| TLine2D binary input. | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TLine2D &l) |
| TLine2D binary output. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TObject2D &o) |
| TObject2D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TObject2D &o) |
| TObject2D binary input. | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TSegment3D &s) |
| TSegment3D binary input. | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TSegment3D &s) |
| TSegment3D binary output. | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TLine3D &l) |
| TLine3D binary input. | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TLine3D &l) |
| TLine3D binary output. | |
| mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TPlane &p) |
| TPlane binary input. | |
| mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TPlane &p) |
| TPlane binary output. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator>> (mrpt::utils::CStream &in, mrpt::math::TObject3D &o) |
| TObject3D binary input. | |
| MRPTDLLIMPEXP mrpt::utils::CStream & | operator<< (mrpt::utils::CStream &out, const mrpt::math::TObject3D &o) |
| TObject3D binary output. | |
| bool MRPTDLLIMPEXP | loadVector (utils::CFileStream &f, std::vector< int > &d) |
| Loads one row of a text file as a numerical std::vector. | |
| bool MRPTDLLIMPEXP | loadVector (utils::CFileStream &f, std::vector< double > &d) |
| Loads one row of a text file as a numerical std::vector. | |
| template<class T > | |
| size_t | countNonZero (const std::vector< T > &a) |
| A template for counting how many elements in an array are non-Zero. | |
| template<class T > | |
| T | maximum (const std::vector< T > &v, unsigned int *maxIndex=NULL) |
| Finds the maximum value (and the corresponding zero-based index) from a given vector. | |
| template<class T > | |
| T | norm_inf (const std::vector< T > &v, unsigned int *maxIndex=NULL) |
| Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements. | |
| template<class T > | |
| T | norm (const std::vector< T > &v) |
| Compute the 2-norm of the vector (the Euclidean distance to the origin). | |
| template<class T > | |
| T | minimum (const std::vector< T > &v, unsigned int *minIndex=NULL) |
| Finds the maximum value (and the corresponding zero-based index) from a given vector. | |
| template<class T > | |
| void | minimum_maximum (const std::vector< T > &v, T &out_min, T &out_max, unsigned int *minIndex=NULL, unsigned int *maxIndex=NULL) |
| Compute the minimum and maximum of a vector at once. | |
| template<class T > | |
| double | mean (const std::vector< T > &v) |
| Computes the mean value of a vector. | |
| template<class T > | |
| T | sum (const std::vector< T > &v) |
| Computes the sum of all the elements of a vector. | |
| template<typename T , typename K > | |
| void | linspace (T first, T last, size_t count, std::vector< K > &out_vector) |
| Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points. | |
| template<class T > | |
| std::vector< T > | linspace (T first, T last, size_t count) |
| Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points. | |
| template<class T , T STEP> | |
| std::vector< T > | sequence (T first, size_t length) |
| Generates a sequence of values [first,first+STEP,first+2*STEP,. | |
| template<class T > | |
| std::vector< T > | ones (size_t count) |
| Generates a vector of all ones of the given length. | |
| template<class T > | |
| std::vector< T > | zeros (size_t count) |
| Generates a vector of all zeros of the given length. | |
| template<class T > | |
| void | normalize (const std::vector< T > &v, std::vector< T > &out_v) |
| Normalize a vector, such as its norm is the unity. | |
| template<class T > | |
| std::vector< T > | cumsum (const std::vector< T > &v) |
| Computes the cumulative sum of all the elements of a vector. | |
| template<class T > | |
| void | cumsum (const std::vector< T > &v, std::vector< T > &out_cumsum) |
| Computes the cumulative sum of all the elements of a vector, saving the result in a given vector. | |
| template<class T > | |
| double | stddev (const std::vector< T > &v, bool unbiased=true) |
| Computes the standard deviation of a vector. | |
| template<class T > | |
| void | meanAndCov (const std::vector< std::vector< T > > &v, vector_double &out_mean, CMatrixDouble &out_cov) |
| Computes the mean vector and covariance from a list of values given as a vector of vectors, where each row is a sample. | |
| template<class MAT_IN , class MAT_OUT > | |
| void | meanAndCov (const MAT_IN &v, vector_double &out_mean, MAT_OUT &out_cov) |
| Computes the mean vector and covariance from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM. | |
| template<class T > | |
| CMatrixDouble | cov (const std::vector< std::vector< T > > &v) |
| Computes the covariance matrix from a list of values given as a vector of vectors, where each row is a sample. | |
| template<class T > | |
| CMatrixDouble | cov (const CMatrixTemplate< T > &v) |
| Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM. | |
| template<class T , size_t N, size_t M> | |
| CMatrixFixedNumeric< T, M, M > | cov (const CMatrixFixedNumeric< T, N, M > &v) |
| Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM. | |
| template<class T > | |
| void | meanAndStd (const std::vector< T > &v, double &out_mean, double &out_std, bool unbiased=true) |
| Computes the standard deviation of a vector. | |
| template<class T > | |
| void | weightedHistogram (const std::vector< T > &values, const std::vector< T > &weights, float binWidth, std::vector< float > &out_binCenters, std::vector< float > &out_binValues) |
| Computes the weighted histogram for a vector of values and their corresponding weights. | |
| uint64_t MRPTDLLIMPEXP | factorial64 (unsigned int n) |
| Computes the factorial of an integer number and returns it as a 64-bit integer number. | |
| double MRPTDLLIMPEXP | 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). | |
| template<class T > | |
| void | wrapTo2PiInPlace (T &a) |
| Modifies the given angle to translate it into the [0,2pi[ range. | |
| template<class T > | |
| T | wrapTo2Pi (T a) |
| Modifies the given angle to translate it into the [0,2pi[ range. | |
| template<class T > | |
| T | wrapToPi (T a) |
| Modifies the given angle to translate it into the ]-pi,pi] range. | |
| template<class T > | |
| void | wrapToPiInPlace (T &a) |
| Modifies the given angle to translate it into the ]-pi,pi] range. | |
| template<class T > | |
| T | round2up (T val) |
| Round up to the nearest power of two of a given number. | |
| template<class T > | |
| T | round_10power (T val, int power10) |
| Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, . | |
| template<class T > | |
| void | chol (const CMatrixTemplateNumeric< T > &in, CMatrixTemplateNumeric< T > &out) |
| Cholesky factorization: in = out' · out Given a positive-definite symmetric matrix, this routine constructs its Cholesky decomposition. | |
| template<class T > | |
| double | correlate_matrix (const CMatrixTemplateNumeric< T > &a1, const CMatrixTemplateNumeric< T > &a2) |
| Calculate the correlation between two matrices (by AJOGD @ JAN-2007). | |
| template<class T > | |
| void MRPTDLLIMPEXP | qr_decomposition (CMatrixTemplateNumeric< T > &A, CMatrixTemplateNumeric< T > &R, CMatrixTemplateNumeric< T > &Q, CVectorTemplate< T > &c, int &sing) |
| Matrix QR decomposition. | |
| template<class T > | |
| void MRPTDLLIMPEXP | UpdateCholesky (CMatrixTemplateNumeric< T > &chol, CVectorTemplate< T > &r1Modification) |
| If R = CHOL(A) is the original Cholesky factorization of A, then R1 = CHOLUPDATE(R,X) returns the upper triangular Cholesky factor of A + X*X', where X is a column vector of appropriate length. | |
| void MRPTDLLIMPEXP | computeEigenValues2x2 (const CMatrixFloat &in_matrix, float &min_eigenvalue, float &max_eigenvalue) |
| Compute the two eigenvalues of a 2x2 matrix. | |
| template<class T > | |
| std::vector< T > | Exp (const std::vector< T > &v) |
| Computes the 'exp' of all the elements of a vector. | |
| template<class T > | |
| std::vector< T > | Log (const std::vector< T > &v) |
| Computes the 'log' of all the elements of a vector. | |
| double MRPTDLLIMPEXP | averageLogLikelihood (const vector_double &logLikelihoods) |
| A numerically-stable method to compute average likelihood values with strongly different ranges (unweighted likelihoods: compute the arithmetic mean). | |
| double MRPTDLLIMPEXP | averageWrap2Pi (const vector_double &angles) |
Computes the average of a sequence of angles in radians taking into account the correct wrapping in the range , for example, the mean of (2,-2) is , not 0. | |
| double MRPTDLLIMPEXP | averageLogLikelihood (const vector_double &logWeights, const vector_double &logLikelihoods) |
| A numerically-stable method to average likelihood values with strongly different ranges (weighted likelihoods). | |
| std::string MRPTDLLIMPEXP | 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). | |
| void MRPTDLLIMPEXP | homogeneousMatrixInverse (const CMatrixDouble &M, CMatrixDouble &out_inverse_M) |
| Efficiently compute the inverse of a 4x4 homogeneous matrix by only transposing the rotation 3x3 part and solving the translation with dot products. | |
| void MRPTDLLIMPEXP | homogeneousMatrixInverse (const CMatrixDouble44 &M, CMatrixDouble44 &out_inverse_M) |
| Efficiently compute the inverse of a 4x4 homogeneous matrix by only transposing the rotation 3x3 part and solving the translation with dot products. | |
| template<class T > | |
| size_t | countCommonElements (const std::vector< T > &a, const std::vector< T > &b) |
| Counts the number of elements that appear in both vectors (comparison through the == operator) It is assumed that no repeated elements appear within each of the vectors. | |
| template<typename T , class USERPARAM > | |
| void | estimateJacobian (const std::vector< T > &x, void(*functor)(const std::vector< T > &x, const USERPARAM &y, std::vector< T > &out), const std::vector< T > &increments, const USERPARAM &userParam, CMatrixTemplateNumeric< T > &out_Jacobian) |
| Estimate the Jacobian of a multi-dimensional function around a point "x", using finite differences of a given size in each input dimension. | |
| template<class T > | |
| vector_double | histogram (const std::vector< T > &v, double limit_min, double limit_max, size_t number_bins, bool do_normalization=false) |
| Computes the normalized or normal histogram of a sequence of numbers given the number of bins and the limits. | |
| template<typename T , typename At , size_t N> | |
| std::vector< T > & | loadVector (std::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). | |
| template<class T > | |
| std::vector< T > | Abs (const std::vector< T > &a) |
| Absolute value of a vector. | |
| void | unwrap2PiSequence (vector_double &x) |
| Modify a sequence of angle values such as no consecutive values have a jump larger than PI in absolute value. | |
| template<typename T , size_t N, typename U > | |
| void | covariancesAndMean (const std::vector< T > &elements, CMatrixTemplateNumeric< U > &covariances, U(&means)[N]) |
| Computes covariances and mean of any vector of containers. | |
| template<typename T , size_t N, typename U > | |
| void | covariancesAndMean (const std::vector< T > &elements, CMatrixFixedNumeric< U, N, N > &covariances, U(&means)[N]) |
| Computes covariances and mean of any vector of containers. | |
| template<typename T , size_t N, typename U > | |
| void | covariancesAndMean (const std::vector< T > &elements, CMatrixFixedNumeric< U, N, N > &covariances, std::vector< U > &means) |
| Computes covariances and mean of any vector of containers. | |
| template<size_t N, class T , class U , class V > | |
| T | dotProduct (const U &v1, const V &v2) |
| The dot product of two vectors v1·v2. | |
| template<size_t N, class T , class U > | |
| T | squareNorm (const U &v) |
| Square norm of a vector of the given length N. | |
| template<size_t N, typename T > | |
| std::vector< T > | make_vector (const T val1,...) |
| A versatile template to build vectors on-the-fly in a style close to MATLAB's v=[a b c d . | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, const std::vector< T > &d) |
| A template function for printing out the contents of a std::vector variable. | |
| template<class T > | |
| std::ostream & | operator<< (std::ostream &out, std::vector< T > *d) |
| A template function for printing out the contents of a std::vector variable. | |
| template<class T > | |
| std::vector< T > | operator+ (const std::vector< T > &a, T b) |
| A template function for the operator + between a scalar and a std::vector. | |
| template<class T > | |
| std::vector< T > | operator- (const std::vector< T > &a, T b) |
| A template function for the operator - between a scalar and a std::vector. | |
| template<class T > | |
| std::vector< T > | operator* (const std::vector< T > &a, T b) |
| A template function for the operator * between a scalar and a std::vector. | |
| template<class T > | |
| std::vector< T > | operator/ (const std::vector< T > &a, T b) |
| A template function for dividing a std::vector by a scalar number. | |
| template<class T > | |
| std::vector< T > | operator+ (const std::vector< T > &a, const std::vector< T > &b) |
| A template function for adding std::vector's having the same number of elements. | |
| template<class T > | |
| std::vector< T > | operator- (const std::vector< T > &a, const std::vector< T > &b) |
| A template function for substracting std::vector's having the same number of elements. | |
| template<class T > | |
| std::vector< T > | operator* (const std::vector< T > &a, const std::vector< T > &b) |
| A template function for scalar product (element by element, like . | |
| template<class T > | |
| std::vector< T > | operator/ (const std::vector< T > &a, const std::vector< T > &b) |
| A template function for scalar division (element by element, like . | |
| template<class T > | |
| void | operator+= (std::vector< T > &a, const std::vector< T > &b) |
| A template for the operator += applied to std::vector's having the same number of elements. | |
| template<class T > | |
| void | operator-= (std::vector< T > &a, const std::vector< T > &b) |
| A template for the operator -= applied to std::vector's having the same number of elements. | |
| template<class T > | |
| void | operator*= (std::vector< T > &a, const std::vector< T > &b) |
| A template for the operator *= applied to std::vector's having the same number of elements. | |
| template<class T > | |
| void | operator/= (std::vector< T > &a, const std::vector< T > &b) |
| A template for the operator /= applied to std::vector's having the same number of elements. | |
| template<class T > | |
| void | operator+= (std::vector< T > &a, T b) |
| A template for the operator += applied to a std::vector and a scalar. | |
| template<class T > | |
| void | operator-= (std::vector< T > &a, T b) |
| A template for the operator -= applied to a std::vector and a scalar. | |
| template<class T > | |
| void | operator*= (std::vector< T > &a, T b) |
| A template for the operator *= applied to a std::vector and a scalar. | |
| template<class T > | |
| void | operator/= (std::vector< T > &a, T b) |
| A template for the operator /= applied to a std::vector and a scalar. | |
Conversions from point & poses to matrices | |
Used from the "operator =" from poses/points to CMatrixFixedNumeric | |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPoint2D &p) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPoint3D &p) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPose2D &p) |
| template<typename T , size_t NROWS, size_t NCOLS> | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | matrixFromPoseOrPoint (CMatrixFixedNumeric< T, NROWS, NCOLS > &M, const CPose3D &p) |
| template<> | |
| CMatrixDouble21 & | matrixFromPoseOrPoint (CMatrixDouble21 &M, const CPoint2D &p) |
| template<> | |
| CMatrixDouble31 & | matrixFromPoseOrPoint (CMatrixDouble31 &M, const CPoint3D &p) |
| template<> | |
| CMatrixDouble31 & | matrixFromPoseOrPoint (CMatrixDouble31 &M, const CPose2D &p) |
| template<> | |
| CMatrixDouble61 & | matrixFromPoseOrPoint (CMatrixDouble61 &M, const CPose3D &p) |
Statistics functions | |
| double MRPTDLLIMPEXP | normalPDF (double x, double mu, double std) |
| Evaluates the univariate normal (Gaussian) distribution at a given point "x". | |
| template<typename T > | |
| T | normalPDF (const CMatrixTemplateNumeric< T > &x, const CMatrixTemplateNumeric< T > &mu, const CMatrixTemplateNumeric< T > &cov) |
| Evaluates the multivariate normal (Gaussian) distribution at a given point "x" ("x" and "mu" can be 1xN or Nx1 matrixes). | |
| template<typename T , size_t N> | |
| T | normalPDF (const CMatrixFixedNumeric< T, N, 1 > &x, const CMatrixFixedNumeric< T, N, 1 > &mu, const CMatrixFixedNumeric< T, N, N > &cov) |
| Evaluates the multivariate normal (Gaussian) distribution at a given point "x" ("x" and "mu" can be 1xN or Nx1 matrixes). | |
| double MRPTDLLIMPEXP | erfc (double x) |
| The complementary error function of a Normal distribution. | |
| double MRPTDLLIMPEXP | erf (double x) |
| The error function of a Normal distribution. | |
| double MRPTDLLIMPEXP | normalQuantile (double p) |
| Evaluates the Gaussian distribution quantile for the probability value p=[0,1]. | |
| double MRPTDLLIMPEXP | normalCDF (double p) |
| Evaluates the Gaussian cumulative density function. | |
| double MRPTDLLIMPEXP | chi2inv (double P, unsigned int dim=1) |
| The "quantile" of the Chi-Square distribution, for dimension "dim" and probability 0<P<1 An aproximation from the Wilson-Hilferty transformation is used. | |
Fourier functions | |
| void MRPTDLLIMPEXP | fft_real (vector_float &in_realData, vector_float &out_FFT_Re, vector_float &out_FFT_Im, vector_float &out_FFT_Mag) |
| Computes the FFT of a 2^N-size vector of real numbers, and returns the Re+Im+Magnitude parts. | |
| void MRPTDLLIMPEXP | dft2_real (const CMatrixFloat &in_data, CMatrixFloat &out_real, CMatrixFloat &out_imag) |
| Compute the 2D Discrete Fourier Transform (DFT) of a real matrix, returning the real and imaginary parts separately. | |
| void MRPTDLLIMPEXP | idft2_real (const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_data) |
| Compute the 2D inverse Discrete Fourier Transform (DFT). | |
| void MRPTDLLIMPEXP | dft2_complex (const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_real, CMatrixFloat &out_imag) |
| Compute the 2D Discrete Fourier Transform (DFT) of a complex matrix, returning the real and imaginary parts separately. | |
| void MRPTDLLIMPEXP | idft2_complex (const CMatrixFloat &in_real, const CMatrixFloat &in_imag, CMatrixFloat &out_real, CMatrixFloat &out_imag) |
| Compute the 2D inverse Discrete Fourier Transform (DFT). | |
| void MRPTDLLIMPEXP | cross_correlation_FFT (const CMatrixFloat &A, const CMatrixFloat &B, CMatrixFloat &out_corr) |
| Correlation of two matrixes using 2D FFT. | |
Simple intersection operations, relying basically on geometrical operations. | |
| bool MRPTDLLIMPEXP | intersect (const TSegment3D &s1, const TSegment3D &s2, TObject3D &obj) |
| Gets the intersection between two 3D segments. | |
| bool MRPTDLLIMPEXP | intersect (const TSegment3D &s1, const TPlane &p2, TObject3D &obj) |
| Gets the intersection between a 3D segment and a plane. | |
| bool MRPTDLLIMPEXP | intersect (const TSegment3D &s1, const TLine3D &r2, TObject3D &obj) |
| Gets the intersection between a 3D segment and a 3D line. | |
| bool | intersect (const TPlane &p1, const TSegment3D &s2, TObject3D &obj) |
| Gets the intersection between a plane and a 3D segment. | |
| bool MRPTDLLIMPEXP | intersect (const TPlane &p1, const TPlane &p2, TObject3D &obj) |
| Gets the intersection between two planes. | |
| bool MRPTDLLIMPEXP | intersect (const TPlane &p1, const TLine3D &p2, TObject3D &obj) |
| Gets the intersection between a plane and a 3D line. | |
| bool | intersect (const TLine3D &r1, const TSegment3D &s2, TObject3D &obj) |
| Gets the intersection between a 3D line and a 3D segment. | |
| bool | intersect (const TLine3D &r1, const TPlane &p2, TObject3D &obj) |
| Gets the intersection between a 3D line and a plane. | |
| bool MRPTDLLIMPEXP | intersect (const TLine3D &r1, const TLine3D &r2, TObject3D &obj) |
| Gets the intersection between two 3D lines. | |
| bool MRPTDLLIMPEXP | intersect (const TLine2D &r1, const TLine2D &r2, TObject2D &obj) |
| Gets the intersection between two 2D lines. | |
| bool MRPTDLLIMPEXP | intersect (const TLine2D &r1, const TSegment2D &s2, TObject2D &obj) |
| Gets the intersection between a 2D line and a 2D segment. | |
| bool | intersect (const TSegment2D &s1, const TLine2D &r2, TObject2D &obj) |
| Gets the intersection between a 2D line and a 2D segment. | |
| bool MRPTDLLIMPEXP | intersect (const TSegment2D &s1, const TSegment2D &s2, TObject2D &obj) |
| Gets the intersection between two 2D segments. | |
Angle retrieval methods. Methods which use TSegments will automatically use TLines' implicit constructors. | |
| double MRPTDLLIMPEXP | getAngle (const TPlane &p1, const TPlane &p2) |
| Computes the angle between two planes. | |
| double MRPTDLLIMPEXP | getAngle (const TPlane &p1, const TLine3D &r2) |
| Computes the angle between a plane and a 3D line or segment (implicit constructor will be used if passing a segment instead of a line). | |
| double | getAngle (const TLine3D &r1, const TPlane &p2) |
| Computes the angle between a 3D line or segment and a plane (implicit constructor will be used if passing a segment instead of a line). | |
| double MRPTDLLIMPEXP | getAngle (const TLine3D &r1, const TLine3D &r2) |
| Computes the angle between two 3D lines or segments (implicit constructor will be used if passing a segment instead of a line). | |
| double MRPTDLLIMPEXP | getAngle (const TLine2D &r1, const TLine2D &r2) |
| Computes the angle between two 2D lines or segments (implicit constructor will be used if passing a segment instead of a line). | |
Creation of lines from poses. | |
| void MRPTDLLIMPEXP | createFromPoseX (const CPose3D &p, TLine3D &r) |
| Gets a 3D line corresponding to the X axis in a given pose. | |
| void MRPTDLLIMPEXP | createFromPoseY (const CPose3D &p, TLine3D &r) |
| Gets a 3D line corresponding to the Y axis in a given pose. | |
| void MRPTDLLIMPEXP | createFromPoseZ (const CPose3D &p, TLine3D &r) |
| Gets a 3D line corresponding to the Z axis in a given pose. | |
| void MRPTDLLIMPEXP | createFromPoseAndVector (const CPose3D &p, const double(&vector)[3], TLine3D &r) |
| Gets a 3D line corresponding to any arbitrary vector, in the base given by the pose. | |
| void MRPTDLLIMPEXP | createFromPoseX (const TPose2D &p, TLine2D &r) |
| Gets a 2D line corresponding to the X axis in a given pose. | |
| void MRPTDLLIMPEXP | createFromPoseY (const TPose2D &p, TLine2D &r) |
| Gets a 2D line corresponding to the Y axis in a given pose. | |
| void MRPTDLLIMPEXP | createFromPoseAndVector (const TPose2D &p, const double(&vector)[2], TLine2D &r) |
| Gets a 2D line corresponding to any arbitrary vector, in the base given the given pose. | |
Other line or plane related methods. | |
| bool MRPTDLLIMPEXP | conformAPlane (const std::vector< TPoint3D > &points) |
| Checks whether this polygon or set of points acceptably fits a plane. | |
| bool MRPTDLLIMPEXP | conformAPlane (const std::vector< TPoint3D > &points, TPlane &p) |
| Checks whether this polygon or set of points acceptably fits a plane, and if it's the case returns it in the second argument. | |
| bool MRPTDLLIMPEXP | areAligned (const std::vector< TPoint2D > &points) |
| Checks whether this set of points acceptably fits a 2D line. | |
| bool MRPTDLLIMPEXP | areAligned (const std::vector< TPoint2D > &points, TLine2D &r) |
| Checks whether this set of points acceptably fits a 2D line, and if it's the case returns it in the second argument. | |
| bool MRPTDLLIMPEXP | areAligned (const std::vector< TPoint3D > &points) |
| Checks whether this set of points acceptably fits a 3D line. | |
| bool MRPTDLLIMPEXP | areAligned (const std::vector< TPoint3D > &points, TLine3D &r) |
| Checks whether this set of points acceptably fits a 3D line, and if it's the case returns it in the second argument. | |
Projections | |
| void | project3D (const TPoint3D &point, const CPose3D &newXYpose, TPoint3D &newPoint) |
| Uses the given pose 3D to project a point into a new base. | |
| void | project3D (const TSegment3D &segment, const CPose3D &newXYpose, TSegment3D &newSegment) |
| Uses the given pose 3D to project a segment into a new base. | |
| void MRPTDLLIMPEXP | project3D (const TLine3D &line, const CPose3D &newXYpose, TLine3D &newLine) |
| Uses the given pose 3D to project a line into a new base. | |
| void MRPTDLLIMPEXP | project3D (const TPlane &plane, const CPose3D &newXYpose, TPlane &newPlane) |
| Uses the given pose 3D to project a plane into a new base. | |
| void MRPTDLLIMPEXP | project3D (const TPolygon3D &polygon, const CPose3D &newXYpose, TPolygon3D &newPolygon) |
| Uses the given pose 3D to project a polygon into a new base. | |
| void MRPTDLLIMPEXP | project3D (const TObject3D &object, const CPose3D &newXYPose, TObject3D &newObject) |
| Uses the given pose 3D to project any 3D object into a new base. | |
| template<class T > | |
| void | project3D (const T &obj, const TPlane &newXYPlane, T &newObj) |
| Projects any 3D object into the plane's base, using its inverse pose. | |
| template<class T > | |
| void | project3D (const T &obj, const TPlane &newXYPlane, const TPoint3D &newOrigin, T &newObj) |
| Projects any 3D object into the plane's base, using its inverse pose and forcing the position of the new coordinates origin. | |
| template<class T > | |
| void | project3D (const std::vector< T > &objs, const CPose3D &newXYpose, std::vector< T > &newObjs) |
| Projects a set of 3D objects into the plane's base. | |
| void | project2D (const TPoint2D &point, const CPose2D &newXpose, TPoint2D &newPoint) |
| Uses the given pose 2D to project a point into a new base. | |
| void | project2D (const TSegment2D &segment, const CPose2D &newXpose, TSegment2D &newSegment) |
| Uses the given pose 2D to project a segment into a new base. | |
| void MRPTDLLIMPEXP | project2D (const TLine2D &line, const CPose2D &newXpose, TLine2D &newLine) |
| Uses the given pose 2D to project a line into a new base. | |
| void MRPTDLLIMPEXP | project2D (const TPolygon2D &polygon, const CPose2D &newXpose, TPolygon2D &newPolygon) |
| Uses the given pose 2D to project a polygon into a new base. | |
| void MRPTDLLIMPEXP | project2D (const TObject2D &object, const CPose2D &newXpose, TObject2D &newObject) |
| Uses the given pose 2D to project any 2D object into a new base. | |
| template<class T > | |
| void | project2D (const T &obj, const TLine2D &newXLine, T &newObj) |
| Projects any 2D object into the line's base, using its inverse pose. | |
| template<class T > | |
| void | project2D (const T &obj, const TLine2D &newXLine, const TPoint2D &newOrigin, T &newObj) |
| Projects any 2D object into the line's base, using its inverse pose and forcing the position of the new coordinate origin. | |
| template<class T > | |
| void | project2D (const std::vector< T > &objs, const CPose2D &newXpose, std::vector< T > &newObjs) |
| Projects a set of 2D objects into the line's base. | |
Polygon intersections. These operations rely more on spatial reasoning than in raw numerical operations. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon2D &p1, const TSegment2D &s2, TObject2D &obj) |
| Gets the intersection between a 2D polygon and a 2D segment. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon2D &p1, const TLine2D &r2, TObject2D &obj) |
| Gets the intersection between a 2D polygon and a 2D line. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon2D &p1, const TPolygon2D &p2, TObject2D &obj) |
| Gets the intersection between two 2D polygons. | |
| bool | intersect (const TSegment2D &s1, const TPolygon2D &p2, TObject2D &obj) |
| Gets the intersection between a 2D segment and a 2D polygon. | |
| bool | intersect (const TLine2D &r1, const TPolygon2D &p2, TObject2D &obj) |
| Gets the intersection between a 2D line and a 2D polygon. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon3D &p1, const TSegment3D &s2, TObject3D &obj) |
| Gets the intersection between a 3D polygon and a 3D segment. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon3D &p1, const TLine3D &r2, TObject3D &obj) |
| Gets the intersection between a 3D polygon and a 3D line. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon3D &p1, const TPlane &p2, TObject3D &obj) |
| Gets the intersection between a 3D polygon and a plane. | |
| bool MRPTDLLIMPEXP | intersect (const TPolygon3D &p1, const TPolygon3D &p2, TObject3D &obj) |
| Gets the intersection between two 3D polygons. | |
| bool | intersect (const TSegment3D &s1, const TPolygon3D &p2, TObject3D &obj) |
| Gets the intersection between a 3D segment and a 3D polygon. | |
| bool | intersect (const TLine3D &r1, const TPolygon3D &p2, TObject3D &obj) |
| Gets the intersection between a 3D line and a 3D polygon. | |
| bool | intersect (const TPlane &p1, const TPolygon3D &p2, TObject3D &obj) |
| Gets the intersection between a plane and a 3D polygon. | |
| size_t MRPTDLLIMPEXP | intersect (const std::vector< TPolygon3D > &v1, const std::vector< TPolygon3D > &v2, CSparseMatrixTemplate< TObject3D > &objs) |
| Gets the intersection between two sets of 3D polygons. | |
| size_t MRPTDLLIMPEXP | intersect (const std::vector< TPolygon3D > &v1, const std::vector< TPolygon3D > &v2, std::vector< TObject3D > &objs) |
| Gets the intersection between two sets of 3D polygons. | |
Other intersections | |
| template<class T , class U , class O > | |
| size_t | intersect (const std::vector< T > &v1, const std::vector< U > &v2, CSparseMatrixTemplate< O > &objs) |
| Gets the intersection between vectors of geometric objects and returns it in a sparse matrix of either TObject2D or TObject3D. | |
| template<class T , class U , class O > | |
| size_t | intersect (const std::vector< T > &v1, const std::vector< U > &v2, std::vector< O > objs) |
| Gets the intersection between vectors of geometric objects and returns it in a vector of either TObject2D or TObject3D. | |
| bool MRPTDLLIMPEXP | intersect (const TObject2D &o1, const TObject2D &o2, TObject2D &obj) |
| Gets the intersection between any pair of 2D objects. | |
| bool MRPTDLLIMPEXP | intersect (const TObject3D &o1, const TObject3D &o2, TObject3D &obj) |
| Gets the intersection between any pair of 3D objects. | |
Distances | |
| double MRPTDLLIMPEXP | distance (const TPoint2D &p1, const TPoint2D &p2) |
| Gets the distance between two points in a 2D space. | |
| double MRPTDLLIMPEXP | distance (const TPoint3D &p1, const TPoint3D &p2) |
| Gets the distance between two points in a 3D space. | |
| double MRPTDLLIMPEXP | distance (const TLine2D &r1, const TLine2D &r2) |
| Gets the distance between two lines in a 2D space. | |
| double MRPTDLLIMPEXP | distance (const TLine3D &r1, const TLine3D &r2) |
| Gets the distance between two lines in a 3D space. | |
| double MRPTDLLIMPEXP | distance (const TPlane &p1, const TPlane &p2) |
| Gets the distance between two planes. | |
| double MRPTDLLIMPEXP | distance (const TPolygon2D &p1, const TPolygon2D &p2) |
| Gets the distance between two polygons in a 2D space. | |
| double MRPTDLLIMPEXP | distance (const TPolygon2D &p1, const TSegment2D &s2) |
| Gets the distance between a polygon and a segment in a 2D space. | |
| double | distance (const TSegment2D &s1, const TPolygon2D &p2) |
| Gets the distance between a segment and a polygon in a 2D space. | |
| double MRPTDLLIMPEXP | distance (const TPolygon2D &p1, const TLine2D &l2) |
| Gets the distance between a polygon and a line in a 2D space. | |
| double | distance (const TLine2D &l1, const TPolygon2D &p2) |
| double MRPTDLLIMPEXP | distance (const TPolygon3D &p1, const TPolygon3D &p2) |
| Gets the distance between two polygons in a 3D space. | |
| double MRPTDLLIMPEXP | distance (const TPolygon3D &p1, const TSegment3D &s2) |
| Gets the distance between a polygon and a segment in a 3D space. | |
| double | distance (const TSegment3D &s1, const TPolygon3D &p2) |
| Gets the distance between a segment and a polygon in a 3D space. | |
| double MRPTDLLIMPEXP | distance (const TPolygon3D &p1, const TLine3D &l2) |
| Gets the distance between a polygon and a line in a 3D space. | |
| double | distance (const TLine3D &l1, const TPolygon3D &p2) |
| Gets the distance between a line and a polygon in a 3D space. | |
| double MRPTDLLIMPEXP | distance (const TPolygon3D &po, const TPlane &pl) |
| Gets the distance between a polygon and a plane. | |
| double | distance (const TPlane &pl, const TPolygon3D &po) |
| Gets the distance between a plane and a polygon. | |
Bound checkers | |
| void MRPTDLLIMPEXP | getRectangleBounds (const std::vector< TPoint2D > &poly, TPoint2D &pMin, TPoint2D &pMax) |
| Gets the rectangular bounds of a 2D polygon or set of 2D points. | |
| void MRPTDLLIMPEXP | getPrismBounds (const std::vector< TPoint3D > &poly, TPoint3D &pMin, TPoint3D &pMax) |
| Gets the prism bounds of a 3D polygon or set of 3D points. | |
Creation of planes from poses | |
| void MRPTDLLIMPEXP | createPlaneFromPoseXY (const CPose3D &pose, TPlane &plane) |
| Given a pose, creates a plane orthogonal to its Z vector. | |
| void MRPTDLLIMPEXP | createPlaneFromPoseXZ (const CPose3D &pose, TPlane &plane) |
| Given a pose, creates a plane orthogonal to its Y vector. | |
| void MRPTDLLIMPEXP | createPlaneFromPoseYZ (const CPose3D &pose, TPlane &plane) |
| Given a pose, creates a plane orthogonal to its X vector. | |
| void MRPTDLLIMPEXP | createPlaneFromPoseAndNormal (const CPose3D &pose, const double(&normal)[3], TPlane &plane) |
| Given a pose and any vector, creates a plane orthogonal to that vector in the pose's coordinates. | |
| void MRPTDLLIMPEXP | generateAxisBaseFromDirectionAndAxis (const double(&vec)[3], char coord, CMatrixDouble &matrix) |
| Creates a rotation matrix so that the coordinate given (0 for x, 1 for y, 2 for z) corresponds to the vector. | |
Linear regression methods | |
| double MRPTDLLIMPEXP | getRegressionLine (const std::vector< TPoint2D > &points, TLine2D &line) |
| Using eigenvalues, gets the best fitting line for a set of 2D points. | |
| double MRPTDLLIMPEXP | getRegressionLine (const std::vector< TPoint3D > &points, TLine3D &line) |
| Using eigenvalues, gets the best fitting line for a set of 3D points. | |
| double MRPTDLLIMPEXP | getRegressionPlane (const std::vector< TPoint3D > &points, TPlane &plane) |
| Using eigenvalues, gets the best fitting plane for a set of 3D points. | |
Miscellaneous methods | |
| void MRPTDLLIMPEXP | assemblePolygons (const std::vector< TSegment3D > &segms, std::vector< TPolygon3D > &polys) |
| Tries to assemble a set of segments into a set of closed polygons. | |
| void MRPTDLLIMPEXP | assemblePolygons (const std::vector< TSegment3D > &segms, std::vector< TPolygon3D > &polys, std::vector< TSegment3D > &remainder) |
| Tries to assemble a set of segments into a set of closed polygons, returning the unused segments as another out parameter. | |
| void MRPTDLLIMPEXP | assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys) |
| Extracts all the polygons, including those formed from segments, from the set of objects. | |
| void MRPTDLLIMPEXP | assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys, std::vector< TObject3D > &remainder) |
| Extracts all the polygons, including those formed from segments, from the set of objects. | |
| void MRPTDLLIMPEXP | assemblePolygons (const std::vector< TObject3D > &objs, std::vector< TPolygon3D > &polys, std::vector< TSegment3D > &remainder1, std::vector< TObject3D > &remainder2) |
| Extracts all the polygons, including those formed from segments, from the set of objects. | |
| void | setEpsilon (double nE) |
| Changes the value of the geometric epsilon. | |
| double | getEpsilon () |
| Gets the value of the geometric epsilon. | |
| bool MRPTDLLIMPEXP | splitInConvexComponents (const TPolygon2D &poly, vector< TPolygon2D > &components) |
| Splits a 2D polygon into convex components. | |
| bool MRPTDLLIMPEXP | splitInConvexComponents (const TPolygon3D &poly, vector< TPolygon3D > &components) |
| Splits a 3D polygon into convex components. | |
| void MRPTDLLIMPEXP | getSegmentBisector (const TSegment2D &sgm, TLine2D &bis) |
| Gets the bisector of a 2D segment. | |
| void MRPTDLLIMPEXP | getSegmentBisector (const TSegment3D &sgm, TPlane &bis) |
| Gets the bisector of a 3D segment. | |
| void MRPTDLLIMPEXP | getAngleBisector (const TLine2D &l1, const TLine2D &l2, TLine2D &bis) |
| Gets the bisector of two lines or segments (implicit constructor will be used if necessary). | |
| void MRPTDLLIMPEXP | getAngleBisector (const TLine3D &l1, const TLine3D &l2, TLine3D &bis) |
| Gets the bisector of two lines or segments (implicit constructor will be used if necessary). | |
RANSAC detectors | |
| template<typename NUMTYPE > | |
| void MRPTDLLIMPEXP | ransac_detect_3D_planes (const std::vector< NUMTYPE > &x, const std::vector< NUMTYPE > &y, const std::vector< NUMTYPE > &z, std::vector< std::pair< size_t, TPlane > > &out_detected_planes, const double threshold, const size_t min_inliers_for_valid_plane=10) |
| Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers. | |
| void MRPTDLLIMPEXP | ransac_detect_3D_planes (const mrpt::slam::CPointsMap *points_map, std::vector< std::pair< size_t, TPlane > > &out_detected_planes, const double threshold, const size_t min_inliers_for_valid_plane=10) |
| Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers. | |
| template<typename NUMTYPE > | |
| void MRPTDLLIMPEXP | ransac_detect_2D_lines (const std::vector< NUMTYPE > &x, const std::vector< NUMTYPE > &y, std::vector< std::pair< size_t, TLine2D > > &out_detected_lines, const double threshold, const size_t min_inliers_for_valid_line=5) |
| Fit a number of 2-D lines to a given point cloud, automatically determining the number of existing lines by means of the provided threshold and minimum number of supporting inliers. | |
Interpolation functions | |
| template<class T > | |
| T | interpolate (const T &x, const std::vector< T > &ys, const T &x0, const T &x1) |
| Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximation of the sequence at the point "x". | |
| double MRPTDLLIMPEXP | interpolate2points (const double x, const double x0, const double y0, const double x1, const double y1, bool wrap2pi=false) |
| Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1). | |
| double MRPTDLLIMPEXP | spline (const double t, const std::vector< double > &x, const std::vector< double > &y, bool wrap2pi=false) |
| Interpolates the value of a function in a point "t" given 4 SORTED points where "t" is between the two middle points If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range). | |
| double MRPTDLLIMPEXP | leastSquareLinearFit (const double t, const std::vector< double > &x, const std::vector< double > &y, bool wrap2pi=false) |
| Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a single point "t". | |
| void MRPTDLLIMPEXP | leastSquareLinearFit (const std::vector< double > &ts, std::vector< double > &outs, const std::vector< double > &x, const std::vector< double > &y, bool wrap2pi=false) |
| Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a sequence of points "ts" and returned at "outs". | |
Probability density distributions (pdf) distance metrics | |
| template<class T > | |
| T MRPTDLLIMPEXP | mahalanobisDistance2 (const std::vector< T > &X, const std::vector< T > &MU, const CMatrixTemplateNumeric< T > &COV_inv) |
| Computes the squared mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv
| |
| template<class T > | |
| T | mahalanobisDistance (const std::vector< T > &X, const std::vector< T > &MU, const CMatrixTemplateNumeric< T > &COV_inv) |
| Computes the mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv
| |
| template<class T > | |
| T MRPTDLLIMPEXP | mahalanobisDistance2 (const std::vector< T > &mean_diffs, const CMatrixTemplateNumeric< T > &COV1, const CMatrixTemplateNumeric< T > &COV2, const CMatrixTemplateNumeric< T > *CROSS_COV12=NULL) |
| Computes the squared mahalanobis distance between two *non-independent* Gaussians, given the two covariance matrices and the vector with the difference of their means. | |
| template<typename T > | |
| T | productIntegralTwoGaussians (const std::vector< T > &mean_diffs, const CMatrixTemplateNumeric< T > &COV1, const CMatrixTemplateNumeric< T > &COV2) |
| Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2". | |
| template<typename T , size_t DIM> | |
| T | productIntegralTwoGaussians (const std::vector< T > &mean_diffs, const CMatrixFixedNumeric< T, DIM, DIM > &COV1, const CMatrixFixedNumeric< T, DIM, DIM > &COV2) |
| Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2". | |
| template<typename T > | |
| void | productIntegralAndMahalanobisTwoGaussians (const std::vector< T > &mean_diffs, const CMatrixTemplateNumeric< T > &COV1, const CMatrixTemplateNumeric< T > &COV2, T &maha_out, T &intprod_out, const CMatrixTemplateNumeric< T > *CROSS_COV12=NULL) |
| Computes both, the integral of the product of two Gaussians and their Mahalanobis distance. | |
Variables | |
| class MRPTDLLIMPEXP | CMatrixTemplateNumeric |
| double | geometryEpsilon |
| Global epsilon to overcome small precision errors. | |
| struct MRPTDLLIMPEXP | TSegment3D |
| struct MRPTDLLIMPEXP | TLine3D |
| class MRPTDLLIMPEXP | TPolygon3D |
| struct MRPTDLLIMPEXP | TObject3D |
| const unsigned char | GEOMETRIC_TYPE_POINT = 0 |
| Object type identifier for TPoint2D or TPoint3D. | |
| const unsigned char | GEOMETRIC_TYPE_SEGMENT = 1 |
| Object type identifier for TSegment2D or TSegment3D. | |
| const unsigned char | GEOMETRIC_TYPE_LINE = 2 |
| Object type identifier for TLine2D or TLine3D. | |
| const unsigned char | GEOMETRIC_TYPE_POLYGON = 3 |
| Object type identifier for TPolygon2D or TPolygon3D. | |
| const unsigned char | GEOMETRIC_TYPE_PLANE = 4 |
| Object type identifier for TPlane. | |
| const unsigned char | GEOMETRIC_TYPE_UNDEFINED = 255 |
| Object type identifier for empty TObject2D or TObject3D. | |
This base provides a set of functions for maths stuff.
| typedef CLevenbergMarquardtTempl<double> mrpt::math::CLevenbergMarquardt |
The default name for the LM class is an instantiation for "double".
Definition at line 227 of file CLevenbergMarquardt.h.
| typedef CMatrixTemplate<bool> mrpt::math::CMatrixBool |
Declares a matrix of booleans (non serializable).
Definition at line 938 of file CMatrixTemplateNumeric.h.
| typedef CMatrixTemplateNumeric<double> mrpt::math::CMatrixDouble |
Declares a matrix of double numbers (non serializable).
For a serializable version, use math::CMatrixD
Definition at line 928 of file CMatrixTemplateNumeric.h.
| typedef CMatrixFixedNumeric<double,1,2> mrpt::math::CMatrixDouble12 |
Definition at line 1195 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,1,3> mrpt::math::CMatrixDouble13 |
Definition at line 1193 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,1,6> mrpt::math::CMatrixDouble16 |
Definition at line 1198 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,2,1> mrpt::math::CMatrixDouble21 |
Definition at line 1196 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,2,2> mrpt::math::CMatrixDouble22 |
Definition at line 1189 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,3,1> mrpt::math::CMatrixDouble31 |
Definition at line 1194 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,3,3> mrpt::math::CMatrixDouble33 |
Definition at line 1190 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,4,4> mrpt::math::CMatrixDouble44 |
Definition at line 1191 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,6,1> mrpt::math::CMatrixDouble61 |
Definition at line 1197 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<double,6,6> mrpt::math::CMatrixDouble66 |
Definition at line 1192 of file CMatrixFixedNumeric.h.
| typedef CMatrixTemplateNumeric<float> mrpt::math::CMatrixFloat |
Declares a matrix of float numbers (non serializable).
For a serializable version, use math::CMatrix
Definition at line 922 of file CMatrixTemplateNumeric.h.
| typedef CMatrixFixedNumeric<float,1,2> mrpt::math::CMatrixFloat12 |
Definition at line 1206 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,1,3> mrpt::math::CMatrixFloat13 |
Definition at line 1204 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,1,6> mrpt::math::CMatrixFloat16 |
Definition at line 1209 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,2,1> mrpt::math::CMatrixFloat21 |
Definition at line 1207 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,2,2> mrpt::math::CMatrixFloat22 |
Definition at line 1200 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,3,1> mrpt::math::CMatrixFloat31 |
Definition at line 1205 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,3,3> mrpt::math::CMatrixFloat33 |
Definition at line 1201 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,4,4> mrpt::math::CMatrixFloat44 |
Definition at line 1202 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,6,1> mrpt::math::CMatrixFloat61 |
Definition at line 1208 of file CMatrixFixedNumeric.h.
| typedef CMatrixFixedNumeric<float,6,6> mrpt::math::CMatrixFloat66 |
Definition at line 1203 of file CMatrixFixedNumeric.h.
| typedef CMatrixTemplateNumeric<double> mrpt::math::CMatrixLongDouble |
Declares a matrix of "long doubles" (non serializable), or of "doubles" if the compiler does not support "long double".
Definition at line 949 of file CMatrixTemplateNumeric.h.
| typedef CMatrixTemplateNumeric<unsigned int> mrpt::math::CMatrixUInt |
Declares a matrix of unsigned ints (non serializable).
Definition at line 933 of file CMatrixTemplateNumeric.h.
| typedef CQuaternion<double> mrpt::math::CQuaternionDouble |
A quaternion of data type "double".
Definition at line 269 of file CQuaternion.h.
| typedef CQuaternion<float> mrpt::math::CQuaternionFloat |
A quaternion of data type "float".
Definition at line 270 of file CQuaternion.h.
| typedef CVectorTemplate<double> mrpt::math::CVectorDouble |
Declares a vector of double elements.
Definition at line 476 of file CVectorTemplate.h.
| typedef CVectorTemplate<float> mrpt::math::CVectorFloat |
Declares a vector of float elements.
Definition at line 471 of file CVectorTemplate.h.
| typedef RANSAC_Template<double> mrpt::math::RANSAC |
Selection of the number format in CMatrixTemplate::saveToTextFile.
| MATRIX_FORMAT_ENG |
engineering format 'e' |
| MATRIX_FORMAT_FIXED |
fixed floating point 'f' |
| MATRIX_FORMAT_INT |
intergers 'i' |
Definition at line 314 of file CMatrixTemplate.h.
| std::vector<T> mrpt::math::Abs | ( | const std::vector< T > & | a | ) | [inline] |
Absolute value of a vector.
Definition at line 995 of file math/utils.h.
| CMatrixTemplateNumeric< T > & mrpt::math::add | ( | CMatrixTemplateNumeric< T > & | A, | |
| const CMatrixFixedNumeric< T, N, M > & | B | |||
| ) | [inline] |
| bool MRPTDLLIMPEXP mrpt::math::areAligned | ( | const std::vector< TPoint3D > & | points, | |
| TLine3D & | r | |||
| ) |
Checks whether this set of points acceptably fits a 3D line, and if it's the case returns it in the second argument.
| bool MRPTDLLIMPEXP mrpt::math::areAligned | ( | const std::vector< TPoint3D > & | points | ) |
Checks whether this set of points acceptably fits a 3D line.
| bool MRPTDLLIMPEXP mrpt::math::areAligned | ( | const std::vector< TPoint2D > & | points, | |
| TLine2D & | r | |||
| ) |
Checks whether this set of points acceptably fits a 2D line, and if it's the case returns it in the second argument.
| bool MRPTDLLIMPEXP mrpt::math::areAligned | ( | const std::vector< TPoint2D > & | points | ) |
Checks whether this set of points acceptably fits a 2D line.
| void MRPTDLLIMPEXP mrpt::math::assemblePolygons | ( | const std::vector< TObject3D > & | objs, | |
| std::vector< TPolygon3D > & | polys, | |||
| std::vector< TSegment3D > & | remainder1, | |||
| std::vector< TObject3D > & | remainder2 | |||
| ) |
Extracts all the polygons, including those formed from segments, from the set of objects.
| void MRPTDLLIMPEXP mrpt::math::assemblePolygons | ( | const std::vector< TObject3D > & | objs, | |
| std::vector< TPolygon3D > & | polys, | |||
| std::vector< TObject3D > & | remainder | |||
| ) |
Extracts all the polygons, including those formed from segments, from the set of objects.
| void MRPTDLLIMPEXP mrpt::math::assemblePolygons | ( | const std::vector< TObject3D > & | objs, | |
| std::vector< TPolygon3D > & | polys | |||
| ) |
Extracts all the polygons, including those formed from segments, from the set of objects.
| void MRPTDLLIMPEXP mrpt::math::assemblePolygons | ( | const std::vector< TSegment3D > & | segms, | |
| std::vector< TPolygon3D > & | polys, | |||
| std::vector< TSegment3D > & | remainder | |||
| ) |
Tries to assemble a set of segments into a set of closed polygons, returning the unused segments as another out parameter.
| void MRPTDLLIMPEXP mrpt::math::assemblePolygons | ( | const std::vector< TSegment3D > & | segms, | |
| std::vector< TPolygon3D > & | polys | |||
| ) |
Tries to assemble a set of segments into a set of closed polygons.
| double MRPTDLLIMPEXP mrpt::math::averageLogLikelihood | ( | const vector_double & | logWeights, | |
| const vector_double & | logLikelihoods | |||
| ) |
A numerically-stable method to average likelihood values with strongly different ranges (weighted likelihoods).
This method implements this equation:
See also the tutorial page.
| double MRPTDLLIMPEXP mrpt::math::averageLogLikelihood | ( | const vector_double & | logLikelihoods | ) |
A numerically-stable method to compute average likelihood values with strongly different ranges (unweighted likelihoods: compute the arithmetic mean).
This method implements this equation:
See also the tutorial page.
| double MRPTDLLIMPEXP mrpt::math::averageWrap2Pi | ( | const vector_double & | angles | ) |
Computes the average of a sequence of angles in radians taking into account the correct wrapping in the range
, for example, the mean of (2,-2) is
, not 0.
| double MRPTDLLIMPEXP mrpt::math::chi2inv | ( | double | P, | |
| unsigned int | dim = 1 | |||
| ) |
The "quantile" of the Chi-Square distribution, for dimension "dim" and probability 0<P<1 An aproximation from the Wilson-Hilferty transformation is used.
| void mrpt::math::chol | ( | const CMatrixTemplateNumeric< T > & | in, | |
| CMatrixTemplateNumeric< T > & | out | |||
| ) | [inline] |
Cholesky factorization: in = out' · out Given a positive-definite symmetric matrix, this routine constructs its Cholesky decomposition.
On input, only the upper triangle of "IN" need be given; it is not modified. The Cholesky factorization is returned in "out" in the upper triangle. (by AJOGD @ JAN-2007)
Definition at line 632 of file math/utils.h.
References mrpt::math::CMatrixTemplate< T >::getColCount(), mrpt::math::CMatrixTemplate< T >::getRowCount(), mrpt::math::CMatrixTemplateNumeric< T >::setSize(), sum(), and THROW_EXCEPTION.
| void MRPTDLLIMPEXP mrpt::math::closestFromPointToLine | ( | const double & | Px, | |
| const double & | Py, | |||
| const double & | x1, | |||
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| double & | out_x, | |||
| double & | out_y | |||
| ) |
Computes the closest point from a given point to a (infinite) line.
| void MRPTDLLIMPEXP mrpt::math::closestFromPointToSegment | ( | const double & | Px, | |
| const double & | Py, | |||
| const double & | x1, | |||
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| double & | out_x, | |||
| double & | out_y | |||
| ) |
Computes the closest point from a given point to a segment.
| double MRPTDLLIMPEXP mrpt::math::closestSquareDistanceFromPointToLine | ( | const double & | Px, | |
| const double & | Py, | |||
| const double & | x1, | |||
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2 | |||
| ) |
Returns the square distance from a point to a line.
| void MRPTDLLIMPEXP mrpt::math::computeEigenValues2x2 | ( | const CMatrixFloat & | in_matrix, | |
| float & | min_eigenvalue, | |||
| float & | max_eigenvalue | |||
| ) |
Compute the two eigenvalues of a 2x2 matrix.
| in_matrx | The 2x2 input matrix. | |
| min_eigenvalue | (out) The minimum eigenvalue of the matrix. | |
| max_eigenvalue | (out) The maximum eigenvalue of the matrix. by FAMD, MAR-2007 |
| bool MRPTDLLIMPEXP mrpt::math::conformAPlane | ( | const std::vector< TPoint3D > & | points, | |
| TPlane & | p | |||
| ) |
Checks whether this polygon or set of points acceptably fits a plane, and if it's the case returns it in the second argument.
| bool MRPTDLLIMPEXP mrpt::math::conformAPlane | ( | const std::vector< TPoint3D > & | points | ) |
Checks whether this polygon or set of points acceptably fits a plane.
| double mrpt::math::correlate_matrix | ( | const CMatrixTemplateNumeric< T > & | a1, | |
| const CMatrixTemplateNumeric< T > & | a2 | |||
| ) | [inline] |
Calculate the correlation between two matrices (by AJOGD @ JAN-2007).
Definition at line 668 of file math/utils.h.
References mrpt::math::CMatrixTemplate< T >::getColCount(), mrpt::math::CMatrixTemplate< T >::getRowCount(), and THROW_EXCEPTION.
| size_t mrpt::math::countCommonElements | ( | const std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
Counts the number of elements that appear in both vectors (comparison through the == operator) It is assumed that no repeated elements appear within each of the vectors.
Definition at line 840 of file math/utils.h.
| size_t mrpt::math::countNonZero | ( | const std::vector< T > & | a | ) | [inline] |
A template for counting how many elements in an array are non-Zero.
Definition at line 83 of file math/utils.h.
| CMatrixFixedNumeric<T,M,M> mrpt::math::cov | ( | const CMatrixFixedNumeric< T, N, M > & | v | ) | [inline] |
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM.
| v | The set of data, as a NxM matrix. | |
| out_cov | The output MxM matrix for the estimated covariance matrix. |
Definition at line 453 of file math/utils.h.
References meanAndCov().
| CMatrixDouble mrpt::math::cov | ( | const CMatrixTemplate< T > & | v | ) | [inline] |
Computes the covariance matrix from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM.
| v | The set of data, as a NxM matrix. | |
| out_cov | The output MxM matrix for the estimated covariance matrix. |
Definition at line 439 of file math/utils.h.
References meanAndCov().
| CMatrixDouble mrpt::math::cov | ( | const std::vector< std::vector< T > > & | v | ) | [inline] |
Computes the covariance matrix from a list of values given as a vector of vectors, where each row is a sample.
| v | The set of data, as a vector of N vectors of M elements. | |
| out_cov | The output MxM matrix for the estimated covariance matrix. |
Definition at line 425 of file math/utils.h.
References meanAndCov().
Referenced by mrpt::utils::CProbabilityDensityFunction< CPose2D, 3 >::getCovariance().
| void mrpt::math::covariancesAndMean | ( | const std::vector< T > & | elements, | |
| CMatrixFixedNumeric< U, N, N > & | covariances, | |||
| std::vector< U > & | means | |||
| ) | [inline] |
Computes covariances and mean of any vector of containers.
T is some container of U which allows operator[]. N is the size of the containers, and thus the size of the resulting matrix and array. This method may adopt additional interfaces in the future.
Definition at line 1169 of file math/utils.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| void mrpt::math::covariancesAndMean | ( | const std::vector< T > & | elements, | |
| CMatrixFixedNumeric< U, N, N > & | covariances, | |||
| U(&) | means[N] | |||
| ) | [inline] |
Computes covariances and mean of any vector of containers.
T is some container of U which allows operator[]. N is the size of the containers, and thus the size of the resulting matrix and array. This method may adopt additional interfaces in the future.
Definition at line 1148 of file math/utils.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| void mrpt::math::covariancesAndMean | ( | const std::vector< T > & | elements, | |
| CMatrixTemplateNumeric< U > & | covariances, | |||
| U(&) | means[N] | |||
| ) | [inline] |
Computes covariances and mean of any vector of containers.
T is some container of U which allows operator[]. N is the size of the containers, and thus the size of the resulting matrix and array. This method may adopt additional interfaces in the future.
Definition at line 1126 of file math/utils.h.
References mrpt::math::CMatrixTemplate< T >::get_unsafe(), and mrpt::math::CMatrixTemplateNumeric< T >::resize().
| void MRPTDLLIMPEXP mrpt::math::createFromPoseAndVector | ( | const TPose2D & | p, | |
| const double(&) | vector[2], | |||
| TLine2D & | r | |||
| ) |
Gets a 2D line corresponding to any arbitrary vector, in the base given the given pose.
An implicit constructor is used if a CPose2D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseAndVector | ( | const CPose3D & | p, | |
| const double(&) | vector[3], | |||
| TLine3D & | r | |||
| ) |
Gets a 3D line corresponding to any arbitrary vector, in the base given by the pose.
An implicit constructor is used if a TPose3D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseX | ( | const TPose2D & | p, | |
| TLine2D & | r | |||
| ) |
Gets a 2D line corresponding to the X axis in a given pose.
An implicit constructor is used if a CPose2D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseX | ( | const CPose3D & | p, | |
| TLine3D & | r | |||
| ) |
Gets a 3D line corresponding to the X axis in a given pose.
An implicit constructor is used if a TPose3D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseY | ( | const TPose2D & | p, | |
| TLine2D & | r | |||
| ) |
Gets a 2D line corresponding to the Y axis in a given pose.
An implicit constructor is used if a CPose2D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseY | ( | const CPose3D & | p, | |
| TLine3D & | r | |||
| ) |
Gets a 3D line corresponding to the Y axis in a given pose.
An implicit constructor is used if a TPose3D is given.
| void MRPTDLLIMPEXP mrpt::math::createFromPoseZ | ( | const CPose3D & | p, | |
| TLine3D & | r | |||
| ) |
Gets a 3D line corresponding to the Z axis in a given pose.
An implicit constructor is used if a TPose3D is given.
| void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseAndNormal | ( | const CPose3D & | pose, | |
| const double(&) | normal[3], | |||
| TPlane & | plane | |||
| ) |
Given a pose and any vector, creates a plane orthogonal to that vector in the pose's coordinates.
| void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseXY | ( | const CPose3D & | pose, | |
| TPlane & | plane | |||
| ) |
Given a pose, creates a plane orthogonal to its Z vector.
| void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseXZ | ( | const CPose3D & | pose, | |
| TPlane & | plane | |||
| ) |
Given a pose, creates a plane orthogonal to its Y vector.
| void MRPTDLLIMPEXP mrpt::math::createPlaneFromPoseYZ | ( | const CPose3D & | pose, | |
| TPlane & | plane | |||
| ) |
Given a pose, creates a plane orthogonal to its X vector.
| void MRPTDLLIMPEXP mrpt::math::cross_correlation_FFT | ( | const CMatrixFloat & | A, | |
| const CMatrixFloat & | B, | |||
| CMatrixFloat & | out_corr | |||
| ) |
Correlation of two matrixes using 2D FFT.
| void mrpt::math::crossProduct3D | ( | const std::vector< T > & | v0, | |
| const std::vector< T > & | v1, | |||
| std::vector< T > & | v_out | |||
| ) | [inline] |
Computes the cross product of two 3D vectors, returning a vector normal to both.
It uses the simple implementation:
Definition at line 783 of file geometry.h.
References ASSERT_.
| void mrpt::math::crossProduct3D | ( | const T & | v0, | |
| const U & | v1, | |||
| V & | vOut | |||
| ) | [inline] |
Computes the cross product of two 3D vectors, returning a vector normal to both.
It uses the simple implementation:
Definition at line 765 of file geometry.h.
Referenced by generateAxisBaseFromDirection().
| void mrpt::math::cumsum | ( | const std::vector< T > & | v, | |
| std::vector< T > & | out_cumsum | |||
| ) | [inline] |
Computes the cumulative sum of all the elements of a vector, saving the result in a given vector.
Definition at line 290 of file math/utils.h.
| std::vector<T> mrpt::math::cumsum | ( | const std::vector< T > & | v | ) | [inline] |
Computes the cumulative sum of all the elements of a vector.
Definition at line 275 of file math/utils.h.
| T mrpt::math::detMatrix | ( | const CMatrixFixedNumeric< T, 4, 4 > & | M | ) | [inline] |
Returns the determinant of the matrix.
Definition at line 1449 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_E().
| T mrpt::math::detMatrix | ( | const CMatrixFixedNumeric< T, 3, 3 > & | M | ) | [inline] |
Returns the determinant of the matrix DET = a11(a33a22-a32a23)-a21(a33a12-a32a13)+a31(a23a12-a22a13).
Definition at line 1441 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_E().
| T mrpt::math::detMatrix | ( | const CMatrixFixedNumeric< T, 2, 2 > & | M | ) | [inline] |
Returns the determinant of the matrix.
Definition at line 1434 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
| T mrpt::math::detMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Returns the determinant of the matrix.
Definition at line 1289 of file CMatrixFixedNumeric.h.
References ASSERTMSG_, mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::pivot().
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::det().
| void MRPTDLLIMPEXP mrpt::math::dft2_complex | ( | const CMatrixFloat & | in_real, | |
| const CMatrixFloat & | in_imag, | |||
| CMatrixFloat & | out_real, | |||
| CMatrixFloat & | out_imag | |||
| ) |
Compute the 2D Discrete Fourier Transform (DFT) of a complex matrix, returning the real and imaginary parts separately.
| in_real | The N_1xN_2 matrix with the real part. | |
| in_imag | The N_1xN_2 matrix with the imaginary part. | |
| out_real | The N_1xN_2 output matrix which will store the real values (user has not to initialize the size of this matrix). | |
| out_imag | The N_1xN_2 output matrix which will store the imaginary values (user has not to initialize the size of this matrix). If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm. |
| void MRPTDLLIMPEXP mrpt::math::dft2_real | ( | const CMatrixFloat & | in_data, | |
| CMatrixFloat & | out_real, | |||
| CMatrixFloat & | out_imag | |||
| ) |
Compute the 2D Discrete Fourier Transform (DFT) of a real matrix, returning the real and imaginary parts separately.
| in_data | The N_1xN_2 matrix. | |
| out_real | The N_1xN_2 output matrix which will store the real values (user has not to initialize the size of this matrix). | |
| out_imag | The N_1xN_2 output matrix which will store the imaginary values (user has not to initialize the size of this matrix). |
| double mrpt::math::distance | ( | const TPlane & | pl, | |
| const TPolygon3D & | po | |||
| ) | [inline] |
Gets the distance between a plane and a polygon.
Definition at line 601 of file geometry.h.
References distance().
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon3D & | po, | |
| const TPlane & | pl | |||
| ) |
Gets the distance between a polygon and a plane.
| double mrpt::math::distance | ( | const TLine3D & | l1, | |
| const TPolygon3D & | p2 | |||
| ) | [inline] |
Gets the distance between a line and a polygon in a 3D space.
Definition at line 591 of file geometry.h.
References distance().
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon3D & | p1, | |
| const TLine3D & | l2 | |||
| ) |
Gets the distance between a polygon and a line in a 3D space.
| double mrpt::math::distance | ( | const TSegment3D & | s1, | |
| const TPolygon3D & | p2 | |||
| ) | [inline] |
Gets the distance between a segment and a polygon in a 3D space.
Definition at line 581 of file geometry.h.
References distance().
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon3D & | p1, | |
| const TSegment3D & | s2 | |||
| ) |
Gets the distance between a polygon and a segment in a 3D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon3D & | p1, | |
| const TPolygon3D & | p2 | |||
| ) |
Gets the distance between two polygons in a 3D space.
| double mrpt::math::distance | ( | const TLine2D & | l1, | |
| const TPolygon2D & | p2 | |||
| ) | [inline] |
Definition at line 567 of file geometry.h.
References distance().
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon2D & | p1, | |
| const TLine2D & | l2 | |||
| ) |
Gets the distance between a polygon and a line in a 2D space.
| double mrpt::math::distance | ( | const TSegment2D & | s1, | |
| const TPolygon2D & | p2 | |||
| ) | [inline] |
Gets the distance between a segment and a polygon in a 2D space.
Definition at line 560 of file geometry.h.
References distance().
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon2D & | p1, | |
| const TSegment2D & | s2 | |||
| ) |
Gets the distance between a polygon and a segment in a 2D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPolygon2D & | p1, | |
| const TPolygon2D & | p2 | |||
| ) |
Gets the distance between two polygons in a 2D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPlane & | p1, | |
| const TPlane & | p2 | |||
| ) |
Gets the distance between two planes.
It will be zero if the planes are not parallel.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TLine3D & | r1, | |
| const TLine3D & | r2 | |||
| ) |
Gets the distance between two lines in a 3D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TLine2D & | r1, | |
| const TLine2D & | r2 | |||
| ) |
Gets the distance between two lines in a 2D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPoint3D & | p1, | |
| const TPoint3D & | p2 | |||
| ) |
Gets the distance between two points in a 3D space.
| double MRPTDLLIMPEXP mrpt::math::distance | ( | const TPoint2D & | p1, | |
| const TPoint2D & | p2 | |||
| ) |
Gets the distance between two points in a 2D space.
Referenced by mrpt::slam::TDataAssociationResults::clear(), distance(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationFrom(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationTo(), mrpt::math::CBinaryRelation< T, U, UIsObject >::getRelationValue(), mrpt::math::CBinaryRelation< T, U, UIsObject >::insertElement(), mrpt::math::CBinaryRelation< T, U, UIsObject >::insertElements(), maximum(), minimum(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElement(), mrpt::math::CBinaryRelation< T, U, UIsObject >::removeElements(), mrpt::bayes::CKalmanFilterCapable< 6, 3, 3, 6 >::runOneKalmanIteration(), and mrpt::math::CBinaryRelation< T, U, UIsObject >::setRelationValue().
| T mrpt::math::distanceBetweenPoints | ( | const T | x1, | |
| const T | y1, | |||
| const T | z1, | |||
| const T | x2, | |||
| const T | y2, | |||
| const T | z2 | |||
| ) | [inline] |
Returns the distance between 2 points in 3D.
Definition at line 883 of file geometry.h.
References mrpt::utils::square().
| T mrpt::math::distanceBetweenPoints | ( | const T | x1, | |
| const T | y1, | |||
| const T | x2, | |||
| const T | y2 | |||
| ) | [inline] |
Returns the distance between 2 points in 2D.
Definition at line 877 of file geometry.h.
References mrpt::utils::square().
| double MRPTDLLIMPEXP mrpt::math::distancePointToPolygon2D | ( | const double & | px, | |
| const double & | py, | |||
| unsigned int | polyEdges, | |||
| const double * | poly_xs, | |||
| const double * | poly_ys | |||
| ) |
Returns the closest distance of a given 2D point to a polygon, or "0" if the point is INTO the polygon or its perimeter.
| T mrpt::math::distanceSqrBetweenPoints | ( | const T | x1, | |
| const T | y1, | |||
| const T | z1, | |||
| const T | x2, | |||
| const T | y2, | |||
| const T | z2 | |||
| ) | [inline] |
Returns the square distance between 2 points in 3D.
Definition at line 895 of file geometry.h.
References mrpt::utils::square().
| T mrpt::math::distanceSqrBetweenPoints | ( | const T | x1, | |
| const T | y1, | |||
| const T | x2, | |||
| const T | y2 | |||
| ) | [inline] |
Returns the square distance between 2 points in 2D.
Definition at line 889 of file geometry.h.
References mrpt::utils::square().
| T mrpt::math::dotProduct | ( | const U & | v1, | |
| const V & | v2 | |||
| ) | [inline] |
The dot product of two vectors v1·v2.
Definition at line 1188 of file math/utils.h.
| void MRPTDLLIMPEXP mrpt::math::eigenVectorsMatrix | ( | const CMatrixFixedNumeric< T, 2, 2 > & | M, | |
| CMatrixFixedNumeric< T, 2, 2 > & | Z, | |||
| CMatrixFixedNumeric< T, 2, 2 > & | D | |||
| ) | [inline] |
Used from the method from CMatrix classes instead.
| void mrpt::math::eigenVectorsMatrix | ( | const CMatrixFixedNumeric< T, N, N > & | M, | |
| CMatrixFixedNumeric< T, N, N > & | Z, | |||
| CMatrixFixedNumeric< T, N, N > & | D | |||
| ) | [inline] |
Used from the method from CMatrix classes instead.
Definition at line 1329 of file CMatrixFixedNumeric.h.
References ASSERT_, mrpt::format(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), MRPT_END_WITH_CLEAN_UP, MRPT_START, MRPTDLLIMPEXP, THROW_EXCEPTION, tqli(), and tred2().
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::eigenVectors().
| double MRPTDLLIMPEXP mrpt::math::erf | ( | double | x | ) |
The error function of a Normal distribution.
| double MRPTDLLIMPEXP mrpt::math::erfc | ( | double | x | ) |
The complementary error function of a Normal distribution.
| void mrpt::math::estimateJacobian | ( | const std::vector< T > & | x, | |
| void(*)(const std::vector< T > &x, const USERPARAM &y, std::vector< T > &out) | functor, | |||
| const std::vector< T > & | increments, | |||
| const USERPARAM & | userParam, | |||
| CMatrixTemplateNumeric< T > & | out_Jacobian | |||
| ) | [inline] |
Estimate the Jacobian of a multi-dimensional function around a point "x", using finite differences of a given size in each input dimension.
The template argument USERPARAM is for the data can be passed to the functor. If it is not required, set to "int" or any other basic type.
Definition at line 861 of file math/utils.h.
References ASSERT_, MRPT_END, MRPT_START, and mrpt::math::CMatrixTemplateNumeric< T >::setSize().
Referenced by mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::execute().
| std::vector<T> mrpt::math::Exp | ( | const std::vector< T > & | v | ) | [inline] |
Computes the 'exp' of all the elements of a vector.
Definition at line 749 of file math/utils.h.
| void mrpt::math::extractFixMatrixFromDynMatrix | ( | const CMatrixTemplate< T > & | M, | |
| const size_t | nRow, | |||
| const size_t | nCol, | |||
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | outMat | |||
| ) | [inline] |
Used from CMatrixTemplate::extractMatrix.
Referenced by mrpt::math::CMatrixTemplate< TPoint3D >::extractMatrix().
| double MRPTDLLIMPEXP 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).
| uint64_t MRPTDLLIMPEXP mrpt::math::factorial64 | ( | unsigned int | n | ) |
Computes the factorial of an integer number and returns it as a 64-bit integer number.
| void MRPTDLLIMPEXP mrpt::math::fft_real | ( | vector_float & | in_realData, | |
| vector_float & | out_FFT_Re, | |||
| vector_float & | out_FFT_Im, | |||
| vector_float & | out_FFT_Mag | |||
| ) |
Computes the FFT of a 2^N-size vector of real numbers, and returns the Re+Im+Magnitude parts.
| void mrpt::math::fixedToDynMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | SRC, | |
| CMatrixTemplateNumeric< T > & | DST | |||
| ) | [inline] |
Auxiliary function used in the constructor of dyn.
matrices from a fixed one
Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::CMatrixTemplateNumeric(), and mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator=().
| CMatrixTemplateNumeric<T> mrpt::math::generateAxisBaseFromDirection | ( | T | dx, | |
| T | dy, | |||
| T | dz | |||
| ) | [inline] |
Computes an axis base (a set of three 3D normal vectors) with the given vector being the first of them.
NOTE: Make sure of passing all floats or doubles and that the template of the receiving matrix is of the same type!
If
is the input vector, then this function returns a matrix
such as:
And the three normal vectors are computed as:
If (dx!=0 or dy!=0):
otherwise (the direction vector is vertical):
And finally, the third vector is the cross product of the others:
(JLB @ 18-SEP-2007)
Definition at line 1019 of file geometry.h.
References crossProduct3D(), MRPT_END, MRPT_START, mrpt::utils::square(), and THROW_EXCEPTION.
| void MRPTDLLIMPEXP mrpt::math::generateAxisBaseFromDirectionAndAxis | ( | const double(&) | vec[3], | |
| char | coord, | |||
| CMatrixDouble & | matrix | |||
| ) |
Creates a rotation matrix so that the coordinate given (0 for x, 1 for y, 2 for z) corresponds to the vector.
| double MRPTDLLIMPEXP mrpt::math::getAngle | ( | const TLine2D & | r1, | |
| const TLine2D & | r2 | |||
| ) |
Computes the angle between two 2D lines or segments (implicit constructor will be used if passing a segment instead of a line).
| double MRPTDLLIMPEXP mrpt::math::getAngle | ( | const TLine3D & | r1, | |
| const TLine3D & | r2 | |||
| ) |
Computes the angle between two 3D lines or segments (implicit constructor will be used if passing a segment instead of a line).
| double mrpt::math::getAngle | ( | const TLine3D & | r1, | |
| const TPlane & | p2 | |||
| ) | [inline] |
Computes the angle between a 3D line or segment and a plane (implicit constructor will be used if passing a segment instead of a line).
Definition at line 190 of file geometry.h.
References getAngle().
| double MRPTDLLIMPEXP mrpt::math::getAngle | ( | const TPlane & | p1, | |
| const TLine3D & | r2 | |||
| ) |
Computes the angle between a plane and a 3D line or segment (implicit constructor will be used if passing a segment instead of a line).
| double MRPTDLLIMPEXP mrpt::math::getAngle | ( | const TPlane & | p1, | |
| const TPlane & | p2 | |||
| ) |
Computes the angle between two planes.
Referenced by getAngle().
| void MRPTDLLIMPEXP mrpt::math::getAngleBisector | ( | const TLine3D & | l1, | |
| const TLine3D & | l2, | |||
| TLine3D & | bis | |||
| ) |
Gets the bisector of two lines or segments (implicit constructor will be used if necessary).
| std::logic_error | if the lines do not fit in a single plane. |
| void MRPTDLLIMPEXP mrpt::math::getAngleBisector | ( | const TLine2D & | l1, | |
| const TLine2D & | l2, | |||
| TLine2D & | bis | |||
| ) |
Gets the bisector of two lines or segments (implicit constructor will be used if necessary).
| void mrpt::math::getAsVectorOfAccessors | ( | const CMatrixTemplate< T > & | mat, | |
| std::vector< CConstMatrixRowAccessor< T > > & | vec | |||
| ) | [inline] |
This algorithm transforms a matrix into a vector of accessors.
The resulting object can be accessed using consecutive [] operators. This seems useless, but used with some generic algorithms it makes these suitable for both normal and transposed matrices, and thus permits the generation of highly generic code.
Definition at line 2218 of file CMatrixTemplate.h.
References mrpt::math::detail::getAccessors(), and mrpt::math::CMatrixTemplate< T >::getRowCount().
| void mrpt::math::getAsVectorOfAccessors | ( | CMatrixTemplate< T > & | mat, | |
| std::vector< CMatrixRowAccessor< T > > & | vec | |||
| ) | [inline] |
This algorithm transforms a matrix into a vector of accessors.
The resulting object can be accessed using consecutive [] operators. This seems useless, but used with some generic algorithms it makes these suitable for both normal and transposed matrices, and thus permits the generation of highly generic code.
Definition at line 2208 of file CMatrixTemplate.h.
References mrpt::math::detail::getAccessors(), and mrpt::math::CMatrixTemplate< T >::getRowCount().
| double mrpt::math::getEpsilon | ( | ) | [inline] |
Gets the value of the geometric epsilon.
Definition at line 704 of file geometry.h.
References geometryEpsilon.
| void MRPTDLLIMPEXP mrpt::math::getPrismBounds | ( | const std::vector< TPoint3D > & | poly, | |
| TPoint3D & | pMin, | |||
| TPoint3D & | pMax | |||
| ) |
Gets the prism bounds of a 3D polygon or set of 3D points.
| void MRPTDLLIMPEXP mrpt::math::getRectangleBounds | ( | const std::vector< TPoint2D > & | poly, | |
| TPoint2D & | pMin, | |||
| TPoint2D & | pMax | |||
| ) |
Gets the rectangular bounds of a 2D polygon or set of 2D points.
| double MRPTDLLIMPEXP mrpt::math::getRegressionLine | ( | const std::vector< TPoint3D > & | points, | |
| TLine3D & | line | |||
| ) |
Using eigenvalues, gets the best fitting line for a set of 3D points.
Returns an estimation of the error.
| double MRPTDLLIMPEXP mrpt::math::getRegressionLine | ( | const std::vector< TPoint2D > & | points, | |
| TLine2D & | line | |||
| ) |
Using eigenvalues, gets the best fitting line for a set of 2D points.
Returns an estimation of the error.
| double MRPTDLLIMPEXP mrpt::math::getRegressionPlane | ( | const std::vector< TPoint3D > & | points, | |
| TPlane & | plane | |||
| ) |
Using eigenvalues, gets the best fitting plane for a set of 3D points.
Returns an estimation of the error.
| void MRPTDLLIMPEXP mrpt::math::getSegmentBisector | ( | const TSegment3D & | sgm, | |
| TPlane & | bis | |||
| ) |
Gets the bisector of a 3D segment.
| void MRPTDLLIMPEXP mrpt::math::getSegmentBisector | ( | const TSegment2D & | sgm, | |
| TLine2D & | bis | |||
| ) |
Gets the bisector of a 2D segment.
| void mrpt::math::getTransposedAsVectorOfAccessors | ( | const CMatrixTemplate< T > & | mat, | |
| std::vector< CConstMatrixColumnAccessor< T > > & | vec | |||
| ) | [inline] |
This algorithm transforms a matrix into a vector of accessors.
The resulting object can be accessed using consecutive [] operators, but in reversed order. Thus, accessing the normal way is equivalent to accessing the transpose matrix, without need of fully allocating a new matrix.
Definition at line 2238 of file CMatrixTemplate.h.
References mrpt::math::detail::getAccessors(), and mrpt::math::CMatrixTemplate< T >::getColCount().
| void mrpt::math::getTransposedAsVectorOfAccessors | ( | CMatrixTemplate< T > & | mat, | |
| std::vector< CMatrixColumnAccessor< T > > & | vec | |||
| ) | [inline] |
This algorithm transforms a matrix into a vector of accessors.
The resulting object can be accessed using consecutive [] operators, but in reversed order. Thus, accessing the normal way is equivalent to accessing the transpose matrix, without need of fully allocating a new matrix.
Definition at line 2228 of file CMatrixTemplate.h.
References mrpt::math::detail::getAccessors(), and mrpt::math::CMatrixTemplate< T >::getColCount().
| vector_double mrpt::math::histogram | ( | const std::vector< T > & | v, | |
| double | limit_min, | |||
| double | limit_max, | |||
| size_t | number_bins, | |||
| bool | do_normalization = false | |||
| ) | [inline] |
Computes the normalized or normal histogram of a sequence of numbers given the number of bins and the limits.
Definition at line 965 of file math/utils.h.
References mrpt::math::CHistogram::add(), mrpt::math::CHistogram::getBinCount(), and mrpt::math::CHistogram::getBinRatio().
| void MRPTDLLIMPEXP mrpt::math::homogeneousMatrixInverse | ( | const CMatrixDouble44 & | M, | |
| CMatrixDouble44 & | out_inverse_M | |||
| ) |
Efficiently compute the inverse of a 4x4 homogeneous matrix by only transposing the rotation 3x3 part and solving the translation with dot products.
| void MRPTDLLIMPEXP mrpt::math::homogeneousMatrixInverse | ( | const CMatrixDouble & | M, | |
| CMatrixDouble & | out_inverse_M | |||
| ) |
Efficiently compute the inverse of a 4x4 homogeneous matrix by only transposing the rotation 3x3 part and solving the translation with dot products.
| void MRPTDLLIMPEXP mrpt::math::idft2_complex | ( | const CMatrixFloat & | in_real, | |
| const CMatrixFloat & | in_imag, | |||
| CMatrixFloat & | out_real, | |||
| CMatrixFloat & | out_imag | |||
| ) |
Compute the 2D inverse Discrete Fourier Transform (DFT).
| in_real | The N_1xN_2 input matrix with real values, where both dimensions MUST BE powers of 2. | |
| in_imag | The N_1xN_2 input matrix with imaginary values, where both dimensions MUST BE powers of 2. | |
| out_real | The N_1xN_2 output matrix for real part (user has not to initialize the size of this matrix). | |
| out_imag | The N_1xN_2 output matrix for imaginary part (user has not to initialize the size of this matrix). |
| void MRPTDLLIMPEXP mrpt::math::idft2_real | ( | const CMatrixFloat & | in_real, | |
| const CMatrixFloat & | in_imag, | |||
| CMatrixFloat & | out_data | |||
| ) |
Compute the 2D inverse Discrete Fourier Transform (DFT).
| in_real | The N_1xN_2 input matrix with real values. | |
| in_imag | The N_1xN_2 input matrix with imaginary values. | |
| out_data | The N_1xN_2 output matrix (user has not to initialize the size of this matrix). Note that the real and imaginary parts of the FFT will NOT be checked to assure that they represent the transformation of purely real data. If the dimensions of the matrix are powers of two, the fast fourier transform (FFT) is used instead of the general algorithm. |
| void mrpt::math::insertMatrixFixIntoDyn | ( | CMatrixTemplate< T > & | M, | |
| const size_t | nRow, | |||
| const size_t | nCol, | |||
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | in | |||
| ) | [inline] |
Auxiliary function used in CMatrixTemplate.
Referenced by mrpt::math::CMatrixTemplate< TPoint3D >::insertMatrix().
| void mrpt::math::insertMatrixFixTransposeIntoDyn | ( | CMatrixTemplate< T > & | M, | |
| const size_t | nRow, | |||
| const size_t | nCol, | |||
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | in | |||
| ) | [inline] |
Auxiliary function used in CMatrixTemplate.
Referenced by mrpt::math::CMatrixTemplate< TPoint3D >::insertMatrixTranspose().
| T mrpt::math::interpolate | ( | const T & | x, | |
| const std::vector< T > & | ys, | |||
| const T & | x0, | |||
| const T & | x1 | |||
| ) | [inline] |
Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximation of the sequence at the point "x".
If the point "x" is out of the range [x0,x1], the closest extreme "ys" value is returned.
Definition at line 917 of file math/utils.h.
References ASSERT_, MRPT_END, and MRPT_START.
| double MRPTDLLIMPEXP mrpt::math::interpolate2points | ( | const double | x, | |
| const double | x0, | |||
| const double | y0, | |||
| const double | x1, | |||
| const double | y1, | |||
| bool | wrap2pi = false | |||
| ) |
Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1).
If wrap2pi is true, output is wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TObject3D & | o1, | |
| const TObject3D & | o2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between any pair of 3D objects.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TObject2D & | o1, | |
| const TObject2D & | o2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between any pair of 2D objects.
| size_t mrpt::math::intersect | ( | const std::vector< T > & | v1, | |
| const std::vector< U > & | v2, | |||
| std::vector< O > | objs | |||
| ) | [inline] |
Gets the intersection between vectors of geometric objects and returns it in a vector of either TObject2D or TObject3D.
Definition at line 504 of file geometry.h.
References intersect().
| size_t mrpt::math::intersect | ( | const std::vector< T > & | v1, | |
| const std::vector< U > & | v2, | |||
| CSparseMatrixTemplate< O > & | objs | |||
| ) | [inline] |
Gets the intersection between vectors of geometric objects and returns it in a sparse matrix of either TObject2D or TObject3D.
Definition at line 491 of file geometry.h.
References mrpt::math::CSparseMatrixTemplate< T >::clear(), mrpt::math::CSparseMatrixTemplate< T >::getNonNullElements(), intersect(), and mrpt::math::CSparseMatrixTemplate< T >::resize().
| size_t MRPTDLLIMPEXP mrpt::math::intersect | ( | const std::vector< TPolygon3D > & | v1, | |
| const std::vector< TPolygon3D > & | v2, | |||
| std::vector< TObject3D > & | objs | |||
| ) |
Gets the intersection between two sets of 3D polygons.
The intersection is returned as a vector with every intersection found, and the return value is the amount of intersections found.
| size_t MRPTDLLIMPEXP mrpt::math::intersect | ( | const std::vector< TPolygon3D > & | v1, | |
| const std::vector< TPolygon3D > & | v2, | |||
| CSparseMatrixTemplate< TObject3D > & | objs | |||
| ) |
Gets the intersection between two sets of 3D polygons.
The intersection is returned as an sparse matrix with each pair of polygons' intersections, and the return value is the amount of intersections found.
| bool mrpt::math::intersect | ( | const TPlane & | p1, | |
| const TPolygon3D & | p2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a plane and a 3D polygon.
Definition at line 467 of file geometry.h.
References intersect().
| bool mrpt::math::intersect | ( | const TLine3D & | r1, | |
| const TPolygon3D & | p2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a 3D line and a 3D polygon.
Definition at line 460 of file geometry.h.
References intersect().
| bool mrpt::math::intersect | ( | const TSegment3D & | s1, | |
| const TPolygon3D & | p2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a 3D segment and a 3D polygon.
Definition at line 453 of file geometry.h.
References intersect().
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon3D & | p1, | |
| const TPolygon3D & | p2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between two 3D polygons.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon3D & | p1, | |
| const TPlane & | p2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a 3D polygon and a plane.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon3D & | p1, | |
| const TLine3D & | r2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a 3D polygon and a 3D line.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon3D & | p1, | |
| const TSegment3D & | s2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a 3D polygon and a 3D segment.
| bool mrpt::math::intersect | ( | const TLine2D & | r1, | |
| const TPolygon2D & | p2, | |||
| TObject2D & | obj | |||
| ) | [inline] |
Gets the intersection between a 2D line and a 2D polygon.
Definition at line 426 of file geometry.h.
References intersect().
| bool mrpt::math::intersect | ( | const TSegment2D & | s1, | |
| const TPolygon2D & | p2, | |||
| TObject2D & | obj | |||
| ) | [inline] |
Gets the intersection between a 2D segment and a 2D polygon.
Definition at line 419 of file geometry.h.
References intersect().
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon2D & | p1, | |
| const TPolygon2D & | p2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between two 2D polygons.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon2D & | p1, | |
| const TLine2D & | r2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between a 2D polygon and a 2D line.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPolygon2D & | p1, | |
| const TSegment2D & | s2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between a 2D polygon and a 2D segment.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TSegment2D & | s1, | |
| const TSegment2D & | s2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between two 2D segments.
| bool mrpt::math::intersect | ( | const TSegment2D & | s1, | |
| const TLine2D & | r2, | |||
| TObject2D & | obj | |||
| ) | [inline] |
Gets the intersection between a 2D line and a 2D segment.
Definition at line 165 of file geometry.h.
References intersect().
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TLine2D & | r1, | |
| const TSegment2D & | s2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between a 2D line and a 2D segment.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TLine2D & | r1, | |
| const TLine2D & | r2, | |||
| TObject2D & | obj | |||
| ) |
Gets the intersection between two 2D lines.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TLine3D & | r1, | |
| const TLine3D & | r2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between two 3D lines.
| bool mrpt::math::intersect | ( | const TLine3D & | r1, | |
| const TPlane & | p2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a 3D line and a plane.
Definition at line 143 of file geometry.h.
References intersect().
| bool mrpt::math::intersect | ( | const TLine3D & | r1, | |
| const TSegment3D & | s2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a 3D line and a 3D segment.
Definition at line 136 of file geometry.h.
References intersect().
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPlane & | p1, | |
| const TLine3D & | p2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a plane and a 3D line.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TPlane & | p1, | |
| const TPlane & | p2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between two planes.
| bool mrpt::math::intersect | ( | const TPlane & | p1, | |
| const TSegment3D & | s2, | |||
| TObject3D & | obj | |||
| ) | [inline] |
Gets the intersection between a plane and a 3D segment.
Definition at line 119 of file geometry.h.
References intersect().
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TSegment3D & | s1, | |
| const TLine3D & | r2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a 3D segment and a 3D line.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TSegment3D & | s1, | |
| const TPlane & | p2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between a 3D segment and a plane.
| bool MRPTDLLIMPEXP mrpt::math::intersect | ( | const TSegment3D & | s1, | |
| const TSegment3D & | s2, | |||
| TObject3D & | obj | |||
| ) |
Gets the intersection between two 3D segments.
Referenced by mrpt::opengl::CPolyhedron::getIntersection(), and intersect().
| void mrpt::math::invMatrix | ( | const CMatrixFixedNumeric< T, 3, 3 > & | M, | |
| CMatrixFixedNumeric< T, 3, 3 > & | out_inv | |||
| ) | [inline] |
Returns the inverse of the matrix in "out_inv".
Definition at line 1542 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::_E(), ASSERTMSG_, and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::det().
| void mrpt::math::invMatrix | ( | const CMatrixFixedNumeric< T, 2, 2 > & | M, | |
| CMatrixFixedNumeric< T, 2, 2 > & | out_inv | |||
| ) | [inline] |
Returns the inverse of the matrix in "out_inv".
Definition at line 1525 of file CMatrixFixedNumeric.h.
References ASSERTMSG_, mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::det(), and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
| void mrpt::math::invMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | out_inv | |||
| ) | [inline] |
Returns the inverse of the matrix in "out_inv".
Definition at line 1473 of file CMatrixFixedNumeric.h.
References invMatrix_destroySrc().
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::inv(), and invMatrix_destroySrc().
| void mrpt::math::invMatrix_destroySrc | ( | CMatrixFixedNumeric< T, 3, 3 > & | M, | |
| CMatrixFixedNumeric< T, 3, 3 > & | out_inv | |||
| ) | [inline] |
Definition at line 1561 of file CMatrixFixedNumeric.h.
References invMatrix().
| void mrpt::math::invMatrix_destroySrc | ( | CMatrixFixedNumeric< T, 2, 2 > & | M, | |
| CMatrixFixedNumeric< T, 2, 2 > & | out_inv | |||
| ) | [inline] |
Definition at line 1539 of file CMatrixFixedNumeric.h.
References invMatrix().
| void mrpt::math::invMatrix_destroySrc | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | out_inv | |||
| ) | [inline] |
Returns the inverse of the matrix in "out_inv" , DESTROYING the original matrix M.
Definition at line 1482 of file CMatrixFixedNumeric.h.
References ASSERTMSG_, mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::pivot(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::swap_rows(), THROW_EXCEPTION, and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::unit().
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::inv_fast(), and invMatrix().
| bool MRPTDLLIMPEXP mrpt::math::isFinite | ( | double | v | ) |
Returns true if value is finite.
| bool MRPTDLLIMPEXP mrpt::math::isFinite | ( | float | v | ) |
Returns true if value is finite.
| bool MRPTDLLIMPEXP mrpt::math::isNan | ( | double | v | ) |
Returns true if value is Not-a-number (NAN).
| bool MRPTDLLIMPEXP mrpt::math::isNan | ( | float | v | ) |
Returns true if value is Not-a-number (NAN).
| void MRPTDLLIMPEXP mrpt::math::leastSquareLinearFit | ( | const std::vector< double > & | ts, | |
| std::vector< double > & | outs, | |||
| const std::vector< double > & | x, | |||
| const std::vector< double > & | y, | |||
| bool | wrap2pi = false | |||
| ) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a sequence of points "ts" and returned at "outs".
If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
| double MRPTDLLIMPEXP mrpt::math::leastSquareLinearFit | ( | const double | t, | |
| const std::vector< double > & | x, | |||
| const std::vector< double > & | y, | |||
| bool | wrap2pi = false | |||
| ) |
Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a single point "t".
The vectors x and y must have size >=2, and all values of "x" must be different. If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
| std::vector<T> mrpt::math::linspace | ( | T | first, | |
| T | last, | |||
| size_t | count | |||
| ) | [inline] |
Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points.
Definition at line 218 of file math/utils.h.
References linspace().
| void mrpt::math::linspace | ( | T | first, | |
| T | last, | |||
| size_t | count, | |||
| std::vector< K > & | out_vector | |||
| ) | [inline] |
Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points.
Definition at line 198 of file math/utils.h.
Referenced by linspace().
| std::vector<T>& mrpt::math::loadVector | ( | std::vector< T > & | v, | |
| At(&) | theArray[N] | |||
| ) | [inline] |
Assignment operator for initializing a std::vector from a C array (The vector will be automatically set to the correct size).
vector_double v; const double numbers[] = { 1,2,3,5,6,7,8,9,10 }; loadVector( v, numbers );
Definition at line 984 of file math/utils.h.
References MRPT_COMPILE_TIME_ASSERT.
| bool MRPTDLLIMPEXP mrpt::math::loadVector | ( | utils::CFileStream & | f, | |
| std::vector< double > & | d | |||
| ) |
Loads one row of a text file as a numerical std::vector.
| bool MRPTDLLIMPEXP mrpt::math::loadVector | ( | utils::CFileStream & | f, | |
| std::vector< int > & | d | |||
| ) |
Loads one row of a text file as a numerical std::vector.
| std::vector<T> mrpt::math::Log | ( | const std::vector< T > & | v | ) | [inline] |
Computes the 'log' of all the elements of a vector.
Definition at line 762 of file math/utils.h.
| T mrpt::math::mahalanobisDistance | ( | const std::vector< T > & | X, | |
| const std::vector< T > & | MU, | |||
| const CMatrixTemplateNumeric< T > & | COV_inv | |||
| ) | [inline] |
Computes the mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv
.
Definition at line 1024 of file math/utils.h.
References mahalanobisDistance2().
| T MRPTDLLIMPEXP mrpt::math::mahalanobisDistance2 | ( | const std::vector< T > & | mean_diffs, | |
| const CMatrixTemplateNumeric< T > & | COV1, | |||
| const CMatrixTemplateNumeric< T > & | COV2, | |||
| const CMatrixTemplateNumeric< T > * | CROSS_COV12 = NULL | |||
| ) | [inline] |
Computes the squared mahalanobis distance between two *non-independent* Gaussians, given the two covariance matrices and the vector with the difference of their means.
| T MRPTDLLIMPEXP mrpt::math::mahalanobisDistance2 | ( | const std::vector< T > & | X, | |
| const std::vector< T > & | MU, | |||
| const CMatrixTemplateNumeric< T > & | COV_inv | |||
| ) | [inline] |
Computes the squared mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv
.
Referenced by mahalanobisDistance().
| std::vector<T> mrpt::math::make_vector | ( | const T | val1, | |
| ... | ||||
| ) | [inline] |
A versatile template to build vectors on-the-fly in a style close to MATLAB's v=[a b c d .
..] The first argument of the template is the vector length, and the second the type of the numbers. Some examples:
vector_double = make_vector<4,double>(1.0,3.0,4.0,5.0); vector_float = make_vector<2,float>(-8.12, 3e4);
Definition at line 1212 of file math/utils.h.
References MRPT_COMPILE_TIME_ASSERT.
| std::string MRPTDLLIMPEXP 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).
Generates a string with the MATLAB commands required to plot an confidence interval (ellipse) for a 2D Gaussian ('double' version).
| cov22 | The 2x2 covariance matrix | |
| mean | The 2-length vector with the mean | |
| stdCount | How many "quantiles" to get into the area of the ellipse: 2: 95%, 3:99.97%,... | |
| style | A matlab style string, for colors, line styles,... | |
| nEllipsePoints | The number of points in the ellipse to generate | |
| cov22 | The 2x2 covariance matrix | |
| mean | The 2-length vector with the mean | |
| stdCount | How many "quantiles" to get into the area of the ellipse: 2: 95%, 3:99.97%,... | |
| style | A matlab style string, for colors, line styles,... | |
| nEllipsePoints | The number of points in the ellipse to generate |
| CMatrixDouble16 & mrpt::math::matrixFromPoseOrPoint | ( | CMatrixDouble61 & | M, | |
| const CPose3D & | p | |||
| ) | [inline] |
| CMatrixDouble13 & mrpt::math::matrixFromPoseOrPoint | ( | CMatrixDouble31 & | M, | |
| const CPose2D & | p | |||
| ) | [inline] |
| CMatrixDouble13 & mrpt::math::matrixFromPoseOrPoint | ( | CMatrixDouble31 & | M, | |
| const CPoint3D & | p | |||
| ) | [inline] |
| CMatrixDouble12 & mrpt::math::matrixFromPoseOrPoint | ( | CMatrixDouble21 & | M, | |
| const CPoint2D & | p | |||
| ) | [inline] |
| CMatrixFixedNumeric<T,NROWS,NCOLS>& mrpt::math::matrixFromPoseOrPoint | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CPose3D & | p | |||
| ) | [inline] |
Definition at line 1667 of file CMatrixFixedNumeric.h.
References THROW_EXCEPTION.
| CMatrixFixedNumeric<T,NROWS,NCOLS>& mrpt::math::matrixFromPoseOrPoint | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CPose2D & | p | |||
| ) | [inline] |
Definition at line 1666 of file CMatrixFixedNumeric.h.
References THROW_EXCEPTION.
| CMatrixFixedNumeric<T,NROWS,NCOLS>& mrpt::math::matrixFromPoseOrPoint | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CPoint3D & | p | |||
| ) | [inline] |
Definition at line 1665 of file CMatrixFixedNumeric.h.
References THROW_EXCEPTION.
| CMatrixFixedNumeric<T,NROWS,NCOLS>& mrpt::math::matrixFromPoseOrPoint | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CPoint2D & | p | |||
| ) | [inline] |
Definition at line 1664 of file CMatrixFixedNumeric.h.
References THROW_EXCEPTION.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::CMatrixFixedNumeric(), and mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::operator=().
| T mrpt::math::maximum | ( | const std::vector< T > & | v, | |
| unsigned int * | maxIndex = NULL | |||
| ) | [inline] |
Finds the maximum value (and the corresponding zero-based index) from a given vector.
Definition at line 94 of file math/utils.h.
References distance().
Referenced by weightedHistogram().
| T mrpt::math::maximumMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Sum all the elements in the matrix.
Definition at line 978 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::maximum().
| T mrpt::math::maximumMatrix_SIMD | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::maximum().
| double mrpt::math::mean | ( | const std::vector< T > & | v | ) | [inline] |
Computes the mean value of a vector.
Definition at line 179 of file math/utils.h.
Referenced by mrpt::random::CRandomGenerator::drawGaussian1DMatrix(), mrpt::random::CRandomGenerator::drawGaussian1DVector(), mrpt::random::CRandomGenerator::drawGaussianMultivariate(), mrpt::random::CRandomGenerator::drawGaussianMultivariateMany(), mrpt::random::matrixRandomNormal(), and mrpt::random::vectorRandomNormal().
| void mrpt::math::meanAndCov | ( | const MAT_IN & | v, | |
| vector_double & | out_mean, | |||
| MAT_OUT & | out_cov | |||
| ) | [inline] |
Computes the mean vector and covariance from a list of samples in an NxM matrix, where each row is a sample, so the covariance is MxM.
| v | The set of data as a NxM matrix, of types: CMatrixTemplateNumeric or CMatrixFixedNumeric | |
| out_mean | The output M-vector for the estimated mean. | |
| out_cov | The output MxM matrix for the estimated covariance matrix, this can also be either a fixed-size of dynamic size matrix. |
Definition at line 379 of file math/utils.h.
References ASSERTMSG_, and mrpt::utils::square().
| void mrpt::math::meanAndCov | ( | const std::vector< std::vector< T > > & | v, | |
| vector_double & | out_mean, | |||
| CMatrixDouble & | out_cov | |||
| ) | [inline] |
Computes the mean vector and covariance from a list of values given as a vector of vectors, where each row is a sample.
| v | The set of data, as a vector of N vectors of M elements. | |
| out_mean | The output M-vector for the estimated mean. | |
| out_cov | The output MxM matrix for the estimated covariance matrix. |
Definition at line 333 of file math/utils.h.
References ASSERTMSG_, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::utils::square(), and mrpt::math::CMatrixTemplateNumeric< T >::zeros().
Referenced by cov().
| void mrpt::math::meanAndStd | ( | const std::vector< T > & | v, | |
| double & | out_mean, | |||
| double & | out_std, | |||
| bool | unbiased = true | |||
| ) | [inline] |
Computes the standard deviation of a vector.
| v | The set of data | |
| out_mean | The output for the estimated mean | |
| out_std | The output for the estimated standard deviation | |
| unbiased | If set to true or false the std is normalized by "N-1" or "N", respectively. |
Definition at line 469 of file math/utils.h.
References mrpt::utils::square().
| bool MRPTDLLIMPEXP mrpt::math::minDistBetweenLines | ( | const double & | p1_x, | |
| const double & | p1_y, | |||
| const double & | p1_z, | |||
| const double & | p2_x, | |||
| const double & | p2_y, | |||
| const double & | p2_z, | |||
| const double & | p3_x, | |||
| const double & | p3_y, | |||
| const double & | p3_z, | |||
| const double & | p4_x, | |||
| const double & | p4_y, | |||
| const double & | p4_z, | |||
| double & | x, | |||
| double & | y, | |||
| double & | z, | |||
| double & | dist | |||
| ) |
Calculates the minimum distance between a pair of lines.
The lines are given by:
| T mrpt::math::minimum | ( | const std::vector< T > & | v, | |
| unsigned int * | minIndex = NULL | |||
| ) | [inline] |
Finds the maximum value (and the corresponding zero-based index) from a given vector.
Definition at line 139 of file math/utils.h.
References distance().
Referenced by weightedHistogram().
| void mrpt::math::minimum_maximum | ( | const std::vector< T > & | v, | |
| T & | out_min, | |||
| T & | out_max, | |||
| unsigned int * | minIndex = NULL, |
|||
| unsigned int * | maxIndex = NULL | |||
| ) | [inline] |
Compute the minimum and maximum of a vector at once.
Definition at line 150 of file math/utils.h.
| void mrpt::math::minimumAndMaximumMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| T & | val_min, | |||
| T & | val_max | |||
| ) | [inline] |
Sum all the elements in the matrix.
Definition at line 987 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::minimumAndMaximum().
| void mrpt::math::minimumAndMaximumMatrix_SIMD | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| T & | val_min, | |||
| T & | val_max | |||
| ) | [inline] |
| double MRPTDLLIMPEXP mrpt::math::minimumDistanceFromPointToSegment | ( | const double & | Px, | |
| const double & | Py, | |||
| const double & | x1, | |||
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| float & | out_x, | |||
| float & | out_y | |||
| ) |
Computes the closest point from a given point to a segment, and returns that minimum distance.
| double MRPTDLLIMPEXP mrpt::math::minimumDistanceFromPointToSegment | ( | const double & | Px, | |
| const double & | Py, | |||
| const double & | x1, | |||
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| double & | out_x, | |||
| double & | out_y | |||
| ) |
Computes the closest point from a given point to a segment, and returns that minimum distance.
| T mrpt::math::minimumMatrix | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Sum all the elements in the matrix.
Definition at line 969 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::minimum().
| T mrpt::math::minimumMatrix_SIMD | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::minimum().
| void mrpt::math::multiply | ( | const CMatrixFixedNumeric< T, NROWS, M1C > & | m1, | |
| const CMatrixFixedNumeric< T, M1C, NCOLS > & | m2, | |||
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | RESULT | |||
| ) | [inline] |
Multiply 2 matrices: RESULT = m1 * m2.
Definition at line 883 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val, mrpt::system::os::memcpy(), MRPT_END, and MRPT_START.
| void mrpt::math::multiply | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | m, | |
| const T | val | |||
| ) | [inline] |
Multiply by scalar.
Definition at line 930 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by operator*().
| void mrpt::math::multiply_AAt | ( | const CMatrixFixedNumeric< T, M1R, M1C > & | m1, | |
| CMatrixFixedNumeric< T, M1R, M1R > & | RESULT | |||
| ) | [inline] |
Multiply 2 matrices: RESULT = A * A^t.
Definition at line 835 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| void mrpt::math::multiply_Ab | ( | const CMatrixFixedNumeric< T, N, M > & | A, | |
| const std::vector< T > & | a, | |||
| std::vector< T > & | out_v | |||
| ) | [inline] |
Computes the vector v = A * a, where "a" is a column vector of the appropriate length.
Definition at line 814 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| void mrpt::math::multiply_HCHt | ( | const CMatrixFixedNumeric< T, N, M > & | H, | |
| const CMatrixTemplateNumeric< T > & | C, | |||
| CMatrixTemplateNumeric< T > & | R, | |||
| bool | resizeOutputR, | |||
| bool | accumResultInOutput | |||
| ) | [inline] |
Computes R = HCH^t, with optional index offsets in C and R.
Definition at line 1120 of file CMatrixFixedNumeric.h.
References ASSERT_, ASSERTMSG_, mrpt::math::CMatrixTemplate< T >::get_unsafe(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), MRPT_END, MRPT_START, and size().
| void mrpt::math::multiply_HCHt | ( | const MAT_H & | H, | |
| const MAT_C & | C, | |||
| MAT_R & | R, | |||
| bool | accumResultInOutput, | |||
| bool | allow_submatrix_mult | |||
| ) | [inline] |
The generic function which allow mixing any kind of matrices.
Definition at line 1033 of file CMatrixFixedNumeric.h.
References ASSERT_, ASSERTMSG_, MRPT_END, and MRPT_START.
Referenced by mrpt::bayes::CKalmanFilterCapable< 6, 3, 3, 6 >::runOneKalmanIteration(), and mrpt::bayes::detail::runOneKalmanIteration_addNewLandmarks().
| T MRPTDLLIMPEXP mrpt::math::multiply_HCHt_scalar | ( | const std::vector< T > & | H, | |
| const CMatrixTemplateNumeric< T > & | C | |||
| ) | [inline] |
An special case of multiply_HCHt for the case of the resulting matrix being a scalar (that is, a 1x1 matrix) - This method directly returns this as a scalar avoiding the construction of a 1x1 matrix.
return = ( H * C * (~H) ) (0,0);
| T mrpt::math::multiply_HCHt_scalar | ( | const VECTORLIKE & | H, | |
| const CMatrixFixedNumeric< T, DIM, DIM > & | C | |||
| ) | [inline] |
A special case of multiply_HCHt for the case of the resulting matrix being a scalar (that is, a 1x1 matrix) - This method directly returns this as a scalar avoiding the construction of a 1x1 matrix.
return = ( H * C * (~H) ) (0,0);
Definition at line 1643 of file CMatrixFixedNumeric.h.
References ASSERT_, and mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
Referenced by productIntegralAndMahalanobisTwoGaussians(), and productIntegralTwoGaussians().
| void mrpt::math::multiply_HtCH | ( | const CMatrixFixedNumeric< T, M, N > & | H, | |
| const CMatrixFixedNumeric< T, M, M > & | C, | |||
| CMatrixFixedNumeric< T, N, N > & | R, | |||
| bool | accumResultInOutput | |||
| ) | [inline] |
Use the member method with the same name in matrix classes.
Definition at line 1082 of file CMatrixFixedNumeric.h.
References ASSERTMSG_, mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe(), MRPT_END, and MRPT_START.
| void mrpt::math::multiply_SIMD | ( | const CMatrixFixedNumeric< T, NROWS, M1C > & | m1, | |
| const CMatrixFixedNumeric< T, M1C, NCOLS > & | m2, | |||
| CMatrixFixedNumeric< T, NROWS, NCOLS > & | RESULT | |||
| ) | [inline] |
| void mrpt::math::multiply_SIMD | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | m, | |
| const T | val | |||
| ) | [inline] |
| void mrpt::math::multiplySubMatrix | ( | const MAT_X & | X, | |
| const MAT_A & | A, | |||
| MAT_OUT & | outResult, | |||
| const size_t & | A_cols_offset, | |||
| const size_t & | A_rows_offset, | |||
| const size_t & | A_col_count | |||
| ) | [inline] |
Matrix multiplication of this matrix with a submatrix of 'A', saving the result in a third matrix.
OUT = B * A
Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::multiplySubMatrix(), and mrpt::bayes::CKalmanFilterCapable< 6, 3, 3, 6 >::runOneKalmanIteration().
| bool mrpt::math::myStaticCast | ( | double | val | ) | [inline] |
Definition at line 309 of file CMatrixTemplate.h.
| U mrpt::math::myStaticCast | ( | double | val | ) | [inline] |
Definition at line 309 of file CMatrixTemplate.h.
| T mrpt::math::norm | ( | const std::vector< T > & | v | ) | [inline] |
Compute the 2-norm of the vector (the Euclidean distance to the origin).
Definition at line 126 of file math/utils.h.
References mrpt::utils::square().
Referenced by mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::execute().
| T mrpt::math::norm_inf | ( | const std::vector< T > & | v, | |
| unsigned int * | maxIndex = NULL | |||
| ) | [inline] |
Compute the norm-infinite of a vector ($f[ ||{v}||_ $f]), ie the maximum absolute value of the elements.
Definition at line 104 of file math/utils.h.
Referenced by mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::execute().
| double MRPTDLLIMPEXP mrpt::math::normalCDF | ( | double | p | ) |
Evaluates the Gaussian cumulative density function.
The employed approximation is that from W. J. Cody freely available in http://www.netlib.org/specfun/erf
| void mrpt::math::normalize | ( | const std::vector< T > & | v, | |
| std::vector< T > & | out_v | |||
| ) | [inline] |
Normalize a vector, such as its norm is the unity.
If the vector has a null norm, the output is a null vector.
Definition at line 254 of file math/utils.h.
References mrpt::utils::square().
| T mrpt::math::normalPDF | ( | const CMatrixFixedNumeric< T, N, 1 > & | x, | |
| const CMatrixFixedNumeric< T, N, 1 > & | mu, | |||
| const CMatrixFixedNumeric< T, N, N > & | cov | |||
| ) | [inline] |
Evaluates the multivariate normal (Gaussian) distribution at a given point "x" ("x" and "mu" can be 1xN or Nx1 matrixes).
Definition at line 81 of file distributions.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::det(), mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inv(), M_2PI, MRPT_END, and MRPT_START.
| T mrpt::math::normalPDF | ( | const CMatrixTemplateNumeric< T > & | x, | |
| const CMatrixTemplateNumeric< T > & | mu, | |||
| const CMatrixTemplateNumeric< T > & | cov | |||
| ) | [inline] |
Evaluates the multivariate normal (Gaussian) distribution at a given point "x" ("x" and "mu" can be 1xN or Nx1 matrixes).
Definition at line 52 of file distributions.h.
References mrpt::math::CMatrixTemplateNumeric< T >::det(), mrpt::math::CMatrixTemplate< T >::getRowCount(), mrpt::math::CMatrixTemplateNumeric< T >::inv(), M_2PI, MRPT_END, and MRPT_START.
| double MRPTDLLIMPEXP mrpt::math::normalPDF | ( | double | x, | |
| double | mu, | |||
| double | std | |||
| ) |
Evaluates the univariate normal (Gaussian) distribution at a given point "x".
| double MRPTDLLIMPEXP mrpt::math::normalQuantile | ( | double | p | ) |
Evaluates the Gaussian distribution quantile for the probability value p=[0,1].
The employed approximation is that from Peter J. Acklam (pjacklam@online.no), freely available in http://home.online.no/~pjacklam.
| std::vector<T> mrpt::math::ones | ( | size_t | count | ) | [inline] |
Generates a vector of all ones of the given length.
Definition at line 238 of file math/utils.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator! | ( | const CMatrixTemplateNumeric< T > & | m | ) | [inline] |
Unary inversion operator.
Definition at line 893 of file CMatrixTemplateNumeric.h.
References mrpt::math::CMatrixTemplateNumeric< T >::inv().
| CMatrixFixedNumeric<T,NROWS,NROWS> mrpt::math::operator! | ( | const CMatrixFixedNumeric< T, NROWS, NROWS > & | m | ) | [inline] |
unary inverse operator !
Definition at line 1280 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::inv().
| bool mrpt::math::operator!= | ( | const TSegment3D & | s1, | |
| const TSegment3D & | s2 | |||
| ) | [inline] |
Definition at line 624 of file lightweight_geom_data.h.
References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
| bool mrpt::math::operator!= | ( | const TSegment2D & | s1, | |
| const TSegment2D & | s2 | |||
| ) | [inline] |
Definition at line 616 of file lightweight_geom_data.h.
References mrpt::math::TSegment2D::point1, and mrpt::math::TSegment2D::point2.
| bool mrpt::math::operator!= | ( | const TPose3D & | p1, | |
| const TPose3D & | p2 | |||
| ) | [inline] |
Exact comparison between 3D poses, taking possible cycles into account.
Definition at line 468 of file lightweight_geom_data.h.
References mrpt::math::TPose3D::pitch, mrpt::math::TPose3D::roll, wrapTo2Pi(), mrpt::math::TPose3D::x, mrpt::math::TPose3D::y, mrpt::math::TPose3D::yaw, and mrpt::math::TPose3D::z.
| bool mrpt::math::operator!= | ( | const TPose2D & | p1, | |
| const TPose2D & | p2 | |||
| ) | [inline] |
Exact comparison between 2D poses, taking possible cycles into account.
Definition at line 456 of file lightweight_geom_data.h.
References mrpt::math::TPose2D::phi, wrapTo2Pi(), mrpt::math::TPose2D::x, and mrpt::math::TPose2D::y.
| bool mrpt::math::operator!= | ( | const TPoint3D & | p1, | |
| const TPoint3D & | p2 | |||
| ) | [inline] |
Exact comparison between 3D points.
Definition at line 444 of file lightweight_geom_data.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| bool mrpt::math::operator!= | ( | const TPoint2D & | p1, | |
| const TPoint2D & | p2 | |||
| ) | [inline] |
Exact comparison between 2D points.
Definition at line 432 of file lightweight_geom_data.h.
References mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
| bool mrpt::math::operator!= | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
logical no-equal-to operator
Definition at line 775 of file CMatrixTemplateNumeric.h.
| bool mrpt::math::operator!= | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
| std::vector<T> mrpt::math::operator* | ( | const std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template function for scalar product (element by element, like .
* in MATLAB) of std::vector's having the same number of elements.
Definition at line 166 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator* | ( | const std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template function for the operator * between a scalar and a std::vector.
Definition at line 99 of file vector_ops.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator* | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CVectorTemplate< T > & | m2 | |||
| ) | [inline] |
Binary matrix multiplication operator, with one matrix being NxM and the second being a column matrix Mx1.
Definition at line 833 of file CMatrixTemplateNumeric.h.
References mrpt::math::CMatrixTemplate< T >::getRowCount().
| CMatrixTemplateNumeric<T> mrpt::math::operator* | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
binary matrix multiplication operator
Definition at line 823 of file CMatrixTemplateNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator* | ( | const T & | no, | |
| const CMatrixTemplateNumeric< T > & | m | |||
| ) | [inline] |
binary scalar multiplication operator
Definition at line 813 of file CMatrixTemplateNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator* | ( | const CMatrixTemplateNumeric< T > & | m, | |
| const T & | no | |||
| ) | [inline] |
binary scalar multiplication operator
Definition at line 803 of file CMatrixTemplateNumeric.h.
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::operator* | ( | const CMatrixFixedNumeric< T, NROWS, M1C > & | m1, | |
| const CMatrixFixedNumeric< T, M1C, NCOLS > & | m2 | |||
| ) | [inline] |
Multiply 2 matrices with the * operator.
Definition at line 1224 of file CMatrixFixedNumeric.h.
References multiply().
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::operator* | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m1, | |
| const T | v | |||
| ) | [inline] |
Multiply a matrix by a scalar.
Definition at line 1215 of file CMatrixFixedNumeric.h.
| void mrpt::math::operator*= | ( | std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template for the operator *= applied to a std::vector and a scalar.
Definition at line 264 of file vector_ops.h.
| void mrpt::math::operator*= | ( | std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template for the operator *= applied to std::vector's having the same number of elements.
Definition at line 216 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator+ | ( | const std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template function for adding std::vector's having the same number of elements.
Definition at line 132 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator+ | ( | const std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template function for the operator + between a scalar and a std::vector.
Definition at line 69 of file vector_ops.h.
| TPoint3D mrpt::math::operator+ | ( | const TPoint3D & | p1, | |
| const TPoint3D & | p2 | |||
| ) | [inline] |
Sum operator for 3D points.
Definition at line 414 of file lightweight_geom_data.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| CMatrixTemplateNumeric<T> mrpt::math::operator+ | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
binary addition operator
Definition at line 783 of file CMatrixTemplateNumeric.h.
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::operator+ | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m1, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m2 | |||
| ) | [inline] |
Add 2 matrices with the + operator.
Definition at line 1235 of file CMatrixFixedNumeric.h.
| void mrpt::math::operator+= | ( | std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template for the operator += applied to a std::vector and a scalar.
Definition at line 248 of file vector_ops.h.
| void mrpt::math::operator+= | ( | std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template for the operator += applied to std::vector's having the same number of elements.
Definition at line 188 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator- | ( | const std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template function for substracting std::vector's having the same number of elements.
Definition at line 149 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator- | ( | const std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template function for the operator - between a scalar and a std::vector.
Definition at line 84 of file vector_ops.h.
| TPoint3D mrpt::math::operator- | ( | const TPoint3D & | p1, | |
| const TPoint3D & | p2 | |||
| ) | [inline] |
Substract operator for 3D points.
Definition at line 420 of file lightweight_geom_data.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| TPoint3D mrpt::math::operator- | ( | const TPoint3D & | p1 | ) | [inline] |
Unary minus operator for 3D points.
Definition at line 408 of file lightweight_geom_data.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| CMatrixTemplateNumeric<T> mrpt::math::operator- | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
binary subtraction operator
Definition at line 793 of file CMatrixTemplateNumeric.h.
| CMatrixFixedNumeric<T,NCOLS,NROWS> mrpt::math::operator- | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m | ) | [inline] |
unary negative operator -
Definition at line 1258 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::operator- | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m1, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m2 | |||
| ) | [inline] |
Substract 2 matrices with the - operator.
Definition at line 1246 of file CMatrixFixedNumeric.h.
| void mrpt::math::operator-= | ( | std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template for the operator -= applied to a std::vector and a scalar.
Definition at line 256 of file vector_ops.h.
| void mrpt::math::operator-= | ( | std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template for the operator -= applied to std::vector's having the same number of elements.
Definition at line 202 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator/ | ( | const std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template function for scalar division (element by element, like .
/ in MATLAB) of std::vector's having the same number of elements.
Definition at line 177 of file vector_ops.h.
References ASSERT_.
| std::vector<T> mrpt::math::operator/ | ( | const std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template function for dividing a std::vector by a scalar number.
Definition at line 114 of file vector_ops.h.
References THROW_EXCEPTION.
| CMatrixTemplateNumeric<T> mrpt::math::operator/ | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
binary matrix division operator
Definition at line 859 of file CMatrixTemplateNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator/ | ( | const T & | no, | |
| const CMatrixTemplateNumeric< T > & | m | |||
| ) | [inline] |
binary scalar division operator
Definition at line 851 of file CMatrixTemplateNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator/ | ( | const CMatrixTemplateNumeric< T > & | m, | |
| const T & | no | |||
| ) | [inline] |
binary scalar division operator
Definition at line 843 of file CMatrixTemplateNumeric.h.
| void mrpt::math::operator/= | ( | std::vector< T > & | a, | |
| T | b | |||
| ) | [inline] |
A template for the operator /= applied to a std::vector and a scalar.
Definition at line 272 of file vector_ops.h.
References THROW_EXCEPTION.
| void mrpt::math::operator/= | ( | std::vector< T > & | a, | |
| const std::vector< T > & | b | |||
| ) | [inline] |
A template for the operator /= applied to std::vector's having the same number of elements.
Definition at line 230 of file vector_ops.h.
References ASSERT_, and THROW_EXCEPTION.
| bool mrpt::math::operator< | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
| std::ostream& mrpt::math::operator<< | ( | std::ostream & | out, | |
| std::vector< T > * | d | |||
| ) | [inline] |
A template function for printing out the contents of a std::vector variable.
Definition at line 57 of file vector_ops.h.
| std::ostream& mrpt::math::operator<< | ( | std::ostream & | out, | |
| const std::vector< T > & | d | |||
| ) | [inline] |
A template function for printing out the contents of a std::vector variable.
Definition at line 46 of file vector_ops.h.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TObject3D & | o | |||
| ) |
TObject3D binary output.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TPlane & | p | |||
| ) | [inline] |
TPlane binary output.
Definition at line 2227 of file lightweight_geom_data.h.
References mrpt::math::TPlane::coefs.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TLine3D & | l | |||
| ) | [inline] |
TLine3D binary output.
Definition at line 2214 of file lightweight_geom_data.h.
References mrpt::math::TLine3D::director, and mrpt::math::TLine3D::pBase.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TSegment3D & | s | |||
| ) | [inline] |
TSegment3D binary output.
Definition at line 2201 of file lightweight_geom_data.h.
References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TObject2D & | o | |||
| ) |
TObject2D binary input.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TLine2D & | l | |||
| ) | [inline] |
TLine2D binary output.
Definition at line 2179 of file lightweight_geom_data.h.
References mrpt::math::TLine2D::coefs.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TSegment2D & | s | |||
| ) | [inline] |
TSegment2D binary output.
Definition at line 2166 of file lightweight_geom_data.h.
References mrpt::math::TSegment2D::point1, and mrpt::math::TSegment2D::point2.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TPose3D & | o | |||
| ) |
TPose3D binary output.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TPose2D & | o | |||
| ) |
TPose2D binary output.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TPoint3D & | o | |||
| ) |
TPoint3D binary output.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const mrpt::math::TPoint2D & | o | |||
| ) |
TPoint2D binary output.
| std::ostream& mrpt::math::operator<< | ( | std::ostream & | ostrm, | |
| const CMatrixTemplate< T > & | m | |||
| ) | [inline] |
Textual output stream function.
Use only for text output, for example: "std::cout << mat;"
Definition at line 1625 of file CMatrixTemplate.h.
| std::ostream& mrpt::math::operator<< | ( | std::ostream & | ostrm, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m | |||
| ) | [inline] |
Textual output stream function.
Use only for text output, for example: "std::cout << mat;"
Definition at line 1716 of file CMatrixFixedNumeric.h.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const CMatrixFixedNumeric< double, NROWS, NCOLS > & | M | |||
| ) | [inline] |
Write operator for writing into a CStream.
The format is compatible with that of CMatrix & CMatrixD
Definition at line 1706 of file CMatrixFixedNumeric.h.
| mrpt::utils::CStream& mrpt::math::operator<< | ( | mrpt::utils::CStream & | out, | |
| const CMatrixFixedNumeric< float, NROWS, NCOLS > & | M | |||
| ) | [inline] |
Write operator for writing into a CStream.
The format is compatible with that of CMatrix & CMatrixD
Definition at line 1699 of file CMatrixFixedNumeric.h.
| bool mrpt::math::operator<= | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
| bool mrpt::math::operator== | ( | const TSegment3D & | s1, | |
| const TSegment3D & | s2 | |||
| ) | [inline] |
Definition at line 620 of file lightweight_geom_data.h.
References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
| bool mrpt::math::operator== | ( | const TSegment2D & | s1, | |
| const TSegment2D & | s2 | |||
| ) | [inline] |
Definition at line 612 of file lightweight_geom_data.h.
References mrpt::math::TSegment2D::point1, and mrpt::math::TSegment2D::point2.
| bool mrpt::math::operator== | ( | const TPose3D & | p1, | |
| const TPose3D & | p2 | |||
| ) | [inline] |
Exact comparison between 3D poses, taking possible cycles into account.
Definition at line 462 of file lightweight_geom_data.h.
References mrpt::math::TPose3D::pitch, mrpt::math::TPose3D::roll, wrapTo2Pi(), mrpt::math::TPose3D::x, mrpt::math::TPose3D::y, mrpt::math::TPose3D::yaw, and mrpt::math::TPose3D::z.
| bool mrpt::math::operator== | ( | const TPose2D & | p1, | |
| const TPose2D & | p2 | |||
| ) | [inline] |
Exact comparison between 2D poses, taking possible cycles into account.
Definition at line 450 of file lightweight_geom_data.h.
References mrpt::math::TPose2D::phi, wrapTo2Pi(), mrpt::math::TPose2D::x, and mrpt::math::TPose2D::y.
| bool mrpt::math::operator== | ( | const TPoint3D & | p1, | |
| const TPoint3D & | p2 | |||
| ) | [inline] |
Exact comparison between 3D points.
Definition at line 438 of file lightweight_geom_data.h.
References mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
| bool mrpt::math::operator== | ( | const TPoint2D & | p1, | |
| const TPoint2D & | p2 | |||
| ) | [inline] |
Exact comparison between 2D points.
Definition at line 426 of file lightweight_geom_data.h.
References mrpt::math::TPoint2D::x, and mrpt::math::TPoint2D::y.
| bool mrpt::math::operator== | ( | const CMatrixTemplateNumeric< T > & | m1, | |
| const CMatrixTemplateNumeric< T > & | m2 | |||
| ) | [inline] |
Logical equal-to operator.
Definition at line 759 of file CMatrixTemplateNumeric.h.
References mrpt::math::CMatrixTemplate< T >::getColCount(), and mrpt::math::CMatrixTemplate< T >::getRowCount().
| bool mrpt::math::operator== | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M1, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M2 | |||
| ) | [inline] |
Equal comparison (==).
Definition at line 1731 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| bool mrpt::math::operator== | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
Definition at line 265 of file CArray.h.
References mrpt::math::CArray< T, N >::begin(), and mrpt::math::CArray< T, N >::end().
| bool mrpt::math::operator> | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
| bool mrpt::math::operator>= | ( | const CArray< T, N > & | x, | |
| const CArray< T, N > & | y | |||
| ) | [inline] |
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TObject3D & | o | |||
| ) |
TObject3D binary input.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TPlane & | p | |||
| ) | [inline] |
TPlane binary input.
Definition at line 2221 of file lightweight_geom_data.h.
References mrpt::math::TPlane::coefs.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TLine3D & | l | |||
| ) | [inline] |
TLine3D binary input.
Definition at line 2208 of file lightweight_geom_data.h.
References mrpt::math::TLine3D::director, and mrpt::math::TLine3D::pBase.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TSegment3D & | s | |||
| ) | [inline] |
TSegment3D binary input.
Definition at line 2195 of file lightweight_geom_data.h.
References mrpt::math::TSegment3D::point1, and mrpt::math::TSegment3D::point2.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TObject2D & | o | |||
| ) |
TObject2D binary input.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TLine2D & | l | |||
| ) | [inline] |
TLine2D binary input.
Definition at line 2173 of file lightweight_geom_data.h.
References mrpt::math::TLine2D::coefs.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TSegment2D & | s | |||
| ) | [inline] |
TSegment2D binary input.
Definition at line 2160 of file lightweight_geom_data.h.
References mrpt::math::TSegment2D::point1, and mrpt::math::TSegment2D::point2.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TPose3D & | o | |||
| ) |
TPose3D binary input.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TPose2D & | o | |||
| ) |
TPose2D binary input.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TPoint3D & | o | |||
| ) |
TPoint3D binary input.
| MRPTDLLIMPEXP mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| mrpt::math::TPoint2D & | o | |||
| ) |
TPoint2D binary input.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| CMatrixFixedNumeric< double, NROWS, NCOLS > & | M | |||
| ) | [inline] |
Read operator from a CStream.
The format is compatible with that of CMatrix & CMatrixD
Definition at line 1690 of file CMatrixFixedNumeric.h.
| mrpt::utils::CStream& mrpt::math::operator>> | ( | mrpt::utils::CStream & | in, | |
| CMatrixFixedNumeric< float, NROWS, NCOLS > & | M | |||
| ) | [inline] |
Read operator from a CStream.
The format is compatible with that of CMatrix & CMatrixD
Definition at line 1682 of file CMatrixFixedNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator^ | ( | const CMatrixTemplateNumeric< T > & | m, | |
| const unsigned int & | pow | |||
| ) | [inline] |
binary power operator
Definition at line 867 of file CMatrixTemplateNumeric.h.
| CMatrixTemplateNumeric<T> mrpt::math::operator~ | ( | const CMatrixTemplateNumeric< T > & | m | ) | [inline] |
unary transpose operator
Definition at line 877 of file CMatrixTemplateNumeric.h.
References mrpt::math::CMatrixTemplate< T >::getColCount(), and mrpt::math::CMatrixTemplate< T >::getRowCount().
| CMatrixFixedNumeric<T,NCOLS,NROWS> mrpt::math::operator~ | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | m | ) | [inline] |
unary transpose operator ~
Definition at line 1269 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::get_unsafe().
| bool MRPTDLLIMPEXP mrpt::math::pointIntoPolygon2D | ( | const double & | px, | |
| const double & | py, | |||
| unsigned int | polyEdges, | |||
| const double * | poly_xs, | |||
| const double * | poly_ys | |||
| ) |
Returns true if the 2D point (px,py) falls INTO the given polygon.
| bool mrpt::math::pointIntoQuadrangle | ( | T | x, | |
| T | y, | |||
| T | v1x, | |||
| T | v1y, | |||
| T | v2x, | |||
| T | v2y, | |||
| T | v3x, | |||
| T | v3y, | |||
| T | v4x, | |||
| T | v4y | |||
| ) | [inline] |
Specialized method to check whether a point (x,y) falls into a quadrangle.
Definition at line 926 of file geometry.h.
References mrpt::utils::sign(), and wrapToPi().
| void mrpt::math::productIntegralAndMahalanobisTwoGaussians | ( | const std::vector< T > & | mean_diffs, | |
| const CMatrixTemplateNumeric< T > & | COV1, | |||
| const CMatrixTemplateNumeric< T > & | COV2, | |||
| T & | maha_out, | |||
| T & | intprod_out, | |||
| const CMatrixTemplateNumeric< T > * | CROSS_COV12 = NULL | |||
| ) | [inline] |
Computes both, the integral of the product of two Gaussians and their Mahalanobis distance.
Definition at line 1094 of file math/utils.h.
References ASSERT_, mrpt::math::CMatrixTemplateNumeric< T >::det(), mrpt::math::CMatrixTemplateNumeric< T >::inv_fast(), M_2PI, multiply_HCHt_scalar(), and mrpt::math::CMatrixTemplateNumeric< T >::substract_An().
| T mrpt::math::productIntegralTwoGaussians | ( | const std::vector< T > & | mean_diffs, | |
| const CMatrixFixedNumeric< T, DIM, DIM > & | COV1, | |||
| const CMatrixFixedNumeric< T, DIM, DIM > & | COV2 | |||
| ) | [inline] |
Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2".
Definition at line 1072 of file math/utils.h.
References ASSERT_, mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::det(), M_2PI, and multiply_HCHt_scalar().
| T mrpt::math::productIntegralTwoGaussians | ( | const std::vector< T > & | mean_diffs, | |
| const CMatrixTemplateNumeric< T > & | COV1, | |||
| const CMatrixTemplateNumeric< T > & | COV2 | |||
| ) | [inline] |
Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2".
Definition at line 1049 of file math/utils.h.
References ASSERT_, mrpt::math::CMatrixTemplateNumeric< T >::det(), mrpt::math::CMatrixTemplateNumeric< T >::inv_fast(), M_2PI, and multiply_HCHt_scalar().
| void mrpt::math::project2D | ( | const std::vector< T > & | objs, | |
| const CPose2D & | newXpose, | |||
| std::vector< T > & | newObjs | |||
| ) | [inline] |
Projects a set of 2D objects into the line's base.
Definition at line 389 of file geometry.h.
References project2D().
| void mrpt::math::project2D | ( | const T & | obj, | |
| const TLine2D & | newXLine, | |||
| const TPoint2D & | newOrigin, | |||
| T & | newObj | |||
| ) | [inline] |
Projects any 2D object into the line's base, using its inverse pose and forcing the position of the new coordinate origin.
If the object is exactly inside the line, this projection will zero its Y coordinate.
Definition at line 380 of file geometry.h.
References mrpt::poses::CPose2D, mrpt::math::TLine2D::getAsPose2DForcingOrigin(), and project2D().
| void mrpt::math::project2D | ( | const T & | obj, | |
| const TLine2D & | newXLine, | |||
| T & | newObj | |||
| ) | [inline] |
Projects any 2D object into the line's base, using its inverse pose.
If the object is exactly inside the line, this projection will zero its Y coordinate.
Definition at line 371 of file geometry.h.
References mrpt::poses::CPose2D, mrpt::math::TLine2D::getAsPose2D(), and project2D().
| void MRPTDLLIMPEXP mrpt::math::project2D | ( | const TObject2D & | object, | |
| const CPose2D & | newXpose, | |||
| TObject2D & | newObject | |||
| ) |
Uses the given pose 2D to project any 2D object into a new base.
| void MRPTDLLIMPEXP mrpt::math::project2D | ( | const TPolygon2D & | polygon, | |
| const CPose2D & | newXpose, | |||
| TPolygon2D & | newPolygon | |||
| ) |
Uses the given pose 2D to project a polygon into a new base.
| void MRPTDLLIMPEXP mrpt::math::project2D | ( | const TLine2D & | line, | |
| const CPose2D & | newXpose, | |||
| TLine2D & | newLine | |||
| ) |
Uses the given pose 2D to project a line into a new base.
| void mrpt::math::project2D | ( | const TSegment2D & | segment, | |
| const CPose2D & | newXpose, | |||
| TSegment2D & | newSegment | |||
| ) | [inline] |
Uses the given pose 2D to project a segment into a new base.
Definition at line 350 of file geometry.h.
References mrpt::math::TSegment2D::point1, mrpt::math::TSegment2D::point2, and project2D().
| void mrpt::math::project2D | ( | const TPoint2D & | point, | |
| const CPose2D & | newXpose, | |||
| TPoint2D & | newPoint | |||
| ) | [inline] |
Uses the given pose 2D to project a point into a new base.
Definition at line 344 of file geometry.h.
Referenced by project2D().
| void mrpt::math::project3D | ( | const std::vector< T > & | objs, | |
| const CPose3D & | newXYpose, | |||
| std::vector< T > & | newObjs | |||
| ) | [inline] |
Projects a set of 3D objects into the plane's base.
Definition at line 335 of file geometry.h.
References project3D().
| void mrpt::math::project3D | ( | const T & | obj, | |
| const TPlane & | newXYPlane, | |||
| const TPoint3D & | newOrigin, | |||
| T & | newObj | |||
| ) | [inline] |
Projects any 3D object into the plane's base, using its inverse pose and forcing the position of the new coordinates origin.
If the object is exactly inside the plane, this projection will zero its Z coordinates.
Definition at line 325 of file geometry.h.
References project3D().
| void mrpt::math::project3D | ( | const T & | obj, | |
| const TPlane & | newXYPlane, | |||
| T & | newObj | |||
| ) | [inline] |
Projects any 3D object into the plane's base, using its inverse pose.
If the object is exactly inside the plane, this projection will zero its Z coordinates.
Definition at line 316 of file geometry.h.
References project3D().
| void MRPTDLLIMPEXP mrpt::math::project3D | ( | const TObject3D & | object, | |
| const CPose3D & | newXYPose, | |||
| TObject3D & | newObject | |||
| ) |
Uses the given pose 3D to project any 3D object into a new base.
| void MRPTDLLIMPEXP mrpt::math::project3D | ( | const TPolygon3D & | polygon, | |
| const CPose3D & | newXYpose, | |||
| TPolygon3D & | newPolygon | |||
| ) |
Uses the given pose 3D to project a polygon into a new base.
| void MRPTDLLIMPEXP mrpt::math::project3D | ( | const TPlane & | plane, | |
| const CPose3D & | newXYpose, | |||
| TPlane & | newPlane | |||
| ) |
Uses the given pose 3D to project a plane into a new base.
| void MRPTDLLIMPEXP mrpt::math::project3D | ( | const TLine3D & | line, | |
| const CPose3D & | newXYpose, | |||
| TLine3D & | newLine | |||
| ) |
Uses the given pose 3D to project a line into a new base.
| void mrpt::math::project3D | ( | const TSegment3D & | segment, | |
| const CPose3D & | newXYpose, | |||
| TSegment3D & | newSegment | |||
| ) | [inline] |
Uses the given pose 3D to project a segment into a new base.
Definition at line 292 of file geometry.h.
References mrpt::math::TSegment3D::point1, mrpt::math::TSegment3D::point2, and project3D().
| void mrpt::math::project3D | ( | const TPoint3D & | point, | |
| const CPose3D & | newXYpose, | |||
| TPoint3D & | newPoint | |||
| ) | [inline] |
Uses the given pose 3D to project a point into a new base.
Definition at line 286 of file geometry.h.
References mrpt::poses::CPose3D::composePoint(), mrpt::math::TPoint3D::x, mrpt::math::TPoint3D::y, and mrpt::math::TPoint3D::z.
Referenced by project3D().
| void MRPTDLLIMPEXP mrpt::math::qr_decomposition | ( | CMatrixTemplateNumeric< T > & | A, | |
| CMatrixTemplateNumeric< T > & | R, | |||
| CMatrixTemplateNumeric< T > & | Q, | |||
| CVectorTemplate< T > & | c, | |||
| int & | sing | |||
| ) | [inline] |
Matrix QR decomposition.
A = QR, where R is upper triangular and Q is orthogonal, that is, ~QQ = 1 If A is a LxM dimension matrix, this function only return the LxL upper triangular matrix R instead of LxM pseudo-upper triangular matrix (been L<=M) This function has been extracted from "Numerical Recipes in C". /param A is the original matrix to decompose /param c,Q. The orthogonal matrix Q is represented as a product of n-1 Householder matrices Q1,...Qn-1, where Qj = 1 - u[j] x u[j]/c[j] The i'th component of u[j] is zero for i = 1,...,j-1 while the nonzero components are returned in Q(i,j) for i=j,...,n /param R is the upper triangular matrix /param sign returns as true (1) is singularity is encountered during the decomposition, but the decomposition is still complete in this case; otherwise it returns false (0)
| void MRPTDLLIMPEXP mrpt::math::ransac_detect_2D_lines | ( | const std::vector< NUMTYPE > & | x, | |
| const std::vector< NUMTYPE > & | y, | |||
| std::vector< std::pair< size_t, TLine2D > > & | out_detected_lines, | |||
| const double | threshold, | |||
| const size_t | min_inliers_for_valid_line = 5 | |||
| ) | [inline] |
Fit a number of 2-D lines to a given point cloud, automatically determining the number of existing lines by means of the provided threshold and minimum number of supporting inliers.
| out_detected_lines | The output list of pairs: number of supporting inliers, detected line. | |
| threshold | The maximum distance between a point and a temptative line such as the point is considered an inlier. | |
| min_inliers_for_valid_line | The minimum number of supporting inliers to consider a line as valid. |
| void MRPTDLLIMPEXP mrpt::math::ransac_detect_3D_planes | ( | const mrpt::slam::CPointsMap * | points_map, | |
| std::vector< std::pair< size_t, TPlane > > & | out_detected_planes, | |||
| const double | threshold, | |||
| const size_t | min_inliers_for_valid_plane = 10 | |||
| ) |
Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers.
| out_detected_planes | The output list of pairs: number of supporting inliers, detected plane. | |
| threshold | The maximum distance between a point and a temptative plane such as the point is considered an inlier. | |
| min_inliers_for_valid_plane | The minimum number of supporting inliers to consider a plane as valid. |
| void MRPTDLLIMPEXP mrpt::math::ransac_detect_3D_planes | ( | const std::vector< NUMTYPE > & | x, | |
| const std::vector< NUMTYPE > & | y, | |||
| const std::vector< NUMTYPE > & | z, | |||
| std::vector< std::pair< size_t, TPlane > > & | out_detected_planes, | |||
| const double | threshold, | |||
| const size_t | min_inliers_for_valid_plane = 10 | |||
| ) | [inline] |
Fit a number of 3-D planes to a given point cloud, automatically determining the number of existing planes by means of the provided threshold and minimum number of supporting inliers.
| out_detected_planes | The output list of pairs: number of supporting inliers, detected plane. | |
| threshold | The maximum distance between a point and a temptative plane such as the point is considered an inlier. | |
| min_inliers_for_valid_plane | The minimum number of supporting inliers to consider a plane as valid. |
| bool MRPTDLLIMPEXP mrpt::math::RectanglesIntersection | ( | const double & | R1_x_min, | |
| const double & | R1_x_max, | |||
| const double & | R1_y_min, | |||
| const double & | R1_y_max, | |||
| const double & | R2_x_min, | |||
| const double & | R2_x_max, | |||
| const double & | R2_y_min, | |||
| const double & | R2_y_max, | |||
| const double & | R2_pose_x, | |||
| const double & | R2_pose_y, | |||
| const double & | R2_pose_phi | |||
| ) |
Returns wether two rotated rectangles intersect.
The first rectangle is not rotated and given by (R1_x_min,R1_x_max)-(R1_y_min,R1_y_max). The second rectangle is given is a similar way, but it is internally rotated according to the given coordinates translation (R2_pose_x,R2_pose_y,R2_pose_phi(radians)), relative to the coordinates system of rectangle 1.
| T mrpt::math::round2up | ( | T | val | ) | [inline] |
Round up to the nearest power of two of a given number.
Definition at line 602 of file math/utils.h.
References THROW_EXCEPTION.
| T mrpt::math::round_10power | ( | T | val, | |
| int | power10 | |||
| ) | [inline] |
Round a decimal number up to the given 10'th power (eg, to 1000,100,10, and also fractions) power10 means round up to: 1 -> 10, 2 -> 100, 3 -> 1000, .
.. -1 -> 0.1, -2 -> 0.01, ...
Definition at line 618 of file math/utils.h.
References mrpt::utils::round_long().
| void mrpt::math::saveMatrixToTextFile | ( | const MAT & | theMatrix, | |
| const std::string & | file, | |||
| TMatrixTextFileFormat | fileFormat, | |||
| bool | appendMRPTHeader, | |||
| const std::string & | userHeader | |||
| ) | [inline] |
Save matrix to a text file, compatible with MATLAB text format (see also the methods of matrix classes themselves).
| theMatrix | It can be a CMatrixTemplate or a CMatrixFixedNumeric. | |
| file | The target filename. | |
| fileFormat | See TMatrixTextFileFormat. The format of the numbers in the text file. | |
| appendMRPTHeader | Insert this header to the file "% File generated by MRPT. Load with MATLAB with: VAR=load(FILENAME);" | |
| userHeader | Additional text to be written at the head of the file. Typically MALAB comments "% This file blah blah". Final end-of-line is not needed. |
Definition at line 1660 of file CMatrixTemplate.h.
References mrpt::system::dateTimeLocalToString(), mrpt::system::os::fclose(), mrpt::system::os::fopen(), mrpt::system::os::fprintf(), MATRIX_FORMAT_ENG, MATRIX_FORMAT_FIXED, MATRIX_FORMAT_INT, MRPT_END, mrpt::system::MRPT_getVersion(), MRPT_START, mrpt::system::now(), THROW_EXCEPTION, and THROW_EXCEPTION_CUSTOM_MSG1.
Referenced by mrpt::math::CMatrixTemplate< TPoint3D >::saveToTextFile(), and mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::saveToTextFile().
| bool MRPTDLLIMPEXP mrpt::math::SegmentsIntersection | ( | const double & | x1, | |
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| const double & | x3, | |||
| const double & | y3, | |||
| const double & | x4, | |||
| const double & | y4, | |||
| float & | ix, | |||
| float & | iy | |||
| ) |
Returns the intersection point, and if it exists, between two segments.
| bool MRPTDLLIMPEXP mrpt::math::SegmentsIntersection | ( | const double & | x1, | |
| const double & | y1, | |||
| const double & | x2, | |||
| const double & | y2, | |||
| const double & | x3, | |||
| const double & | y3, | |||
| const double & | x4, | |||
| const double & | y4, | |||
| double & | ix, | |||
| double & | iy | |||
| ) |
Returns the intersection point, and if it exists, between two segments.
| std::vector<T> mrpt::math::sequence | ( | T | first, | |
| size_t | length | |||
| ) | [inline] |
Generates a sequence of values [first,first+STEP,first+2*STEP,.
..]
Definition at line 227 of file math/utils.h.
| void mrpt::math::setEpsilon | ( | double | nE | ) | [inline] |
Changes the value of the geometric epsilon.
Definition at line 697 of file geometry.h.
References geometryEpsilon.
| size_t mrpt::math::size | ( | const CMatrixTemplate< T > & | m, | |
| int | dim | |||
| ) | [inline] |
Returns the size of the matrix in the i'th dimension: 1=rows, 2=columns (MATLAB-compatible function).
Definition at line 1642 of file CMatrixTemplate.h.
References mrpt::math::CMatrixTemplate< T >::getColCount(), mrpt::math::CMatrixTemplate< T >::getRowCount(), and THROW_EXCEPTION_CUSTOM_MSG1.
Referenced by mrpt::math::CVectorTemplate< KFTYPE >::abs(), mrpt::math::CVectorTemplate< KFTYPE >::deconcatenate(), mrpt::math::CVectorTemplate< KFTYPE >::extract_array(), mrpt::math::CVectorTemplate< KFTYPE >::extract_vector(), mrpt::math::CVectorTemplate< KFTYPE >::find_max(), mrpt::math::CVectorTemplate< KFTYPE >::find_min(), mrpt::math::CVectorTemplate< KFTYPE >::find_min_max(), mrpt::poses::CPose3D::fromString(), mrpt::poses::CPose2D::fromString(), mrpt::poses::CPoint3D::fromString(), mrpt::poses::CPoint2D::fromString(), mrpt::vision::CMatchedFeatureList::get_type(), mrpt::vision::CFeatureList::get_type(), mrpt::math::CPolygon::GetVertex_x(), mrpt::math::CPolygon::GetVertex_y(), mrpt::vision::CFeature::TDescriptors::hasDescriptorLogPolarImg(), mrpt::vision::CFeature::TDescriptors::hasDescriptorPolarImg(), mrpt::math::CVectorTemplate< KFTYPE >::insert_array(), mrpt::math::CVectorTemplate< KFTYPE >::insert_vector(), mrpt::math::CVectorTemplate< KFTYPE >::likeMatrix(), mrpt::math::CVectorTemplate< KFTYPE >::mean(), multiply_HCHt(), mrpt::math::CVectorTemplate< KFTYPE >::operator*(), mrpt::math::CVectorTemplate< KFTYPE >::operator+(), mrpt::math::CVectorTemplate< KFTYPE >::operator+=(), mrpt::math::CVectorTemplate< KFTYPE >::operator-(), mrpt::math::CVectorTemplate< KFTYPE >::operator/(), mrpt::math::CVectorTemplate< KFTYPE >::operator~(), mrpt::math::CVectorTemplate< KFTYPE >::saveToTextFile(), and mrpt::math::CPolygon::verticesCount().
| double MRPTDLLIMPEXP mrpt::math::spline | ( | const double | t, | |
| const std::vector< double > & | x, | |||
| const std::vector< double > & | y, | |||
| bool | wrap2pi = false | |||
| ) |
Interpolates the value of a function in a point "t" given 4 SORTED points where "t" is between the two middle points If wrap2pi is true, output "y" values are wrapped to ]-pi,pi] (It is assumed that input "y" values already are in the correct range).
| bool MRPTDLLIMPEXP mrpt::math::splitInConvexComponents | ( | const TPolygon3D & | poly, | |
| vector< TPolygon3D > & | components | |||
| ) |
Splits a 3D polygon into convex components.
| std::logic_error | if the polygon can't be fit into a plane. |
| bool MRPTDLLIMPEXP mrpt::math::splitInConvexComponents | ( | const TPolygon2D & | poly, | |
| vector< TPolygon2D > & | components | |||
| ) |
Splits a 2D polygon into convex components.
| void mrpt::math::sqrtMatrix | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Returns the determinant of the matrix.
Definition at line 1318 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::Sqrt().
| T mrpt::math::squareNorm | ( | const U & | v | ) | [inline] |
Square norm of a vector of the given length N.
Definition at line 1196 of file math/utils.h.
| double mrpt::math::stddev | ( | const std::vector< T > & | v, | |
| bool | unbiased = true | |||
| ) | [inline] |
Computes the standard deviation of a vector.
| v | The set of data | |
| unbiased | If set to true or false the std is normalized by "N-1" or "N", respectively. |
Definition at line 306 of file math/utils.h.
References mrpt::utils::square().
| CMatrixTemplateNumeric< T > & mrpt::math::substract | ( | CMatrixTemplateNumeric< T > & | A, | |
| const CMatrixFixedNumeric< T, N, M > & | B | |||
| ) | [inline] |
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::substract | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | B | |||
| ) | [inline] |
Return the sum of two matrices: RET = A-B.
Definition at line 1021 of file CMatrixFixedNumeric.h.
Referenced by mrpt::math::CMatrixTemplateNumeric< KFTYPE >::operator-=().
| void mrpt::math::substractInPlace | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A | |||
| ) | [inline] |
Sum two matrices: M-=A.
Definition at line 1001 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::operator-=().
| void mrpt::math::substractInPlace_SIMD | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A | |||
| ) | [inline] |
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::operator-=().
| T mrpt::math::sum | ( | const std::vector< T > & | v | ) | [inline] |
Computes the sum of all the elements of a vector.
Definition at line 190 of file math/utils.h.
| CMatrixFixedNumeric<T,NROWS,NCOLS> mrpt::math::sum | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | B | |||
| ) | [inline] |
Return the sum of two matrices: RET = A+B.
Definition at line 1011 of file CMatrixFixedNumeric.h.
Referenced by chol(), mrpt::math::CLevenbergMarquardtTempl< NUMTYPE, USERPARAM >::execute(), and mrpt::math::CVectorTemplate< KFTYPE >::mean().
| void mrpt::math::sumInPlace | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A | |||
| ) | [inline] |
Sum two matrices: M+=A.
Definition at line 950 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
| void mrpt::math::sumInPlace | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | m, | |
| const T | val | |||
| ) | [inline] |
Sum a scalar to all elements.
Definition at line 940 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::operator+=(), and mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::operator-=().
| void mrpt::math::sumInPlace_SIMD | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | M, | |
| const CMatrixFixedNumeric< T, NROWS, NCOLS > & | A | |||
| ) | [inline] |
| void mrpt::math::sumInPlace_SIMD | ( | CMatrixFixedNumeric< T, NROWS, NCOLS > & | m, | |
| const T | val | |||
| ) | [inline] |
| T mrpt::math::sumMatrixAllElements | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Sum all the elements in the matrix.
Definition at line 960 of file CMatrixFixedNumeric.h.
References mrpt::math::CMatrixFixedNumeric< T, NROWS, NCOLS >::m_Val.
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::sumAll().
| T mrpt::math::sumMatrixAllElements_SIMD | ( | const CMatrixFixedNumeric< T, NROWS, NCOLS > & | M | ) | [inline] |
Referenced by mrpt::math::CMatrixFixedNumeric< float, 4, 4 >::sumAll().
| void MRPTDLLIMPEXP mrpt::math::tqli | ( | T | d[], | |
| T | e[], | |||
| size_t | nn, | |||
| T ** | z | |||
| ) | [inline] |
Referenced by eigenVectorsMatrix().
| bool mrpt::math::traceRay | ( | const vector< TPolygon3D > & | vec, | |
| const mrpt::poses::CPose3D & | pose, | |||
| double & | dist | |||
| ) | [inline] |
Fast ray tracing method using polygons' properties.
Definition at line 747 of file geometry.h.
References mrpt::math::TPolygonWithPlane::getPlanes(), and traceRay().
| bool MRPTDLLIMPEXP mrpt::math::traceRay | ( | const vector< TPolygonWithPlane > & | vec, | |
| const mrpt::poses::CPose3D & | pose, | |||
| double & | dist | |||
| ) |
Fast ray tracing method using polygons' properties.
Referenced by traceRay().
| void MRPTDLLIMPEXP mrpt::math::tred2 | ( | T ** | a, | |
| size_t | nn, | |||
| T | d[], | |||
| T | e[] | |||
| ) | [inline] |
Referenced by eigenVectorsMatrix().
| void mrpt::math::unwrap2PiSequence | ( | vector_double & | x | ) |
Modify a sequence of angle values such as no consecutive values have a jump larger than PI in absolute value.
| void MRPTDLLIMPEXP mrpt::math::UpdateCholesky | ( | CMatrixTemplateNumeric< T > & | chol, | |
| CVectorTemplate< T > & | r1Modification | |||
| ) | [inline] |
If R = CHOL(A) is the original Cholesky factorization of A, then R1 = CHOLUPDATE(R,X) returns the upper triangular Cholesky factor of A + X*X', where X is a column vector of appropriate length.
| bool mrpt::math::vectorsAreParallel2D | ( | const T & | v1, | |
| const U & | v2 | |||
| ) | [inline] |
Returns true if two 2D vectors are parallel.
The arguments may be points, arrays, etc.
Definition at line 799 of file geometry.h.
References geometryEpsilon.
| bool mrpt::math::vectorsAreParallel3D | ( | const T & | v1, | |
| const U & | v2 | |||
| ) | [inline] |
Returns true if two 3D vectors are parallel.
The arguments may be points, arrays, etc.
Definition at line 807 of file geometry.h.
References geometryEpsilon.
| void mrpt::math::weightedHistogram | ( | const std::vector< T > & | values, | |
| const std::vector< T > & | weights, | |||
| float | binWidth, | |||
| std::vector< float > & | out_binCenters, | |||
| std::vector< float > & | out_binValues | |||
| ) | [inline] |
Computes the weighted histogram for a vector of values and their corresponding weights.
| values | [IN] The N values | |
| weights | [IN] The weights for the corresponding N values | |
| binWidth | [IN] The desired width of the bins | |
| out_binCenters | [OUT] The centers of the M bins generated to cover from the minimum to the maximum value of "values" with the given "binWidth" | |
| out_binValues | [OUT] The ratio of values at each given bin, such as the whole vector sums up the unity. |
Definition at line 503 of file math/utils.h.
References ASSERT_, maximum(), minimum(), MRPT_END, MRPT_START, and mrpt::utils::round().
| T mrpt::math::wrapTo2Pi | ( | T | a | ) | [inline] |
Modifies the given angle to translate it into the [0,2pi[ range.
Definition at line 573 of file math/utils.h.
References wrapTo2PiInPlace().
Referenced by operator!=(), operator==(), and wrapToPi().
| void mrpt::math::wrapTo2PiInPlace | ( | T & | a | ) | [inline] |
Modifies the given angle to translate it into the [0,2pi[ range.
Definition at line 561 of file math/utils.h.
References M_2PI.
Referenced by wrapTo2Pi().
| T mrpt::math::wrapToPi | ( | T | a | ) | [inline] |
Modifies the given angle to translate it into the ]-pi,pi] range.
Definition at line 584 of file math/utils.h.
References M_PI, and wrapTo2Pi().
Referenced by pointIntoQuadrangle(), and wrapToPiInPlace().
| void mrpt::math::wrapToPiInPlace | ( | T & | a | ) | [inline] |
Modifies the given angle to translate it into the ]-pi,pi] range.
Definition at line 594 of file math/utils.h.
References wrapToPi().
| std::vector<T> mrpt::math::zeros | ( | size_t | count | ) | [inline] |
Generates a vector of all zeros of the given length.
Definition at line 245 of file math/utils.h.
| class MRPTDLLIMPEXP mrpt::math::CMatrixTemplateNumeric |
Definition at line 52 of file CMatrixTemplateNumeric.h.
| const unsigned char mrpt::math::GEOMETRIC_TYPE_LINE = 2 |
Object type identifier for TLine2D or TLine3D.
Definition at line 1046 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::generate2DObject(), mrpt::math::TObject3D::isLine(), mrpt::math::TObject2D::isLine(), mrpt::math::TObject3D::operator=(), and mrpt::math::TObject2D::operator=().
| const unsigned char mrpt::math::GEOMETRIC_TYPE_PLANE = 4 |
Object type identifier for TPlane.
Definition at line 1056 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::generate2DObject(), mrpt::math::TObject3D::isPlane(), and mrpt::math::TObject3D::operator=().
| const unsigned char mrpt::math::GEOMETRIC_TYPE_POINT = 0 |
Object type identifier for TPoint2D or TPoint3D.
Definition at line 1036 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::generate2DObject(), mrpt::math::TObject3D::isPoint(), mrpt::math::TObject2D::isPoint(), mrpt::math::TObject3D::operator=(), and mrpt::math::TObject2D::operator=().
| const unsigned char mrpt::math::GEOMETRIC_TYPE_POLYGON = 3 |
Object type identifier for TPolygon2D or TPolygon3D.
Definition at line 1051 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::destroy(), mrpt::math::TObject2D::destroy(), mrpt::math::TObject3D::generate2DObject(), mrpt::math::TObject3D::isPolygon(), mrpt::math::TObject2D::isPolygon(), mrpt::math::TObject3D::operator=(), and mrpt::math::TObject2D::operator=().
| const unsigned char mrpt::math::GEOMETRIC_TYPE_SEGMENT = 1 |
Object type identifier for TSegment2D or TSegment3D.
Definition at line 1041 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::generate2DObject(), mrpt::math::TObject3D::isSegment(), mrpt::math::TObject2D::isSegment(), mrpt::math::TObject3D::operator=(), and mrpt::math::TObject2D::operator=().
| const unsigned char mrpt::math::GEOMETRIC_TYPE_UNDEFINED = 255 |
Object type identifier for empty TObject2D or TObject3D.
Definition at line 1061 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::destroy(), mrpt::math::TObject2D::destroy(), and mrpt::math::TObject3D::operator=().
| double mrpt::math::geometryEpsilon |
Global epsilon to overcome small precision errors.
Referenced by getEpsilon(), setEpsilon(), vectorsAreParallel2D(), and vectorsAreParallel3D().
| struct MRPTDLLIMPEXP mrpt::math::TLine3D |
Definition at line 473 of file lightweight_geom_data.h.
| struct MRPTDLLIMPEXP mrpt::math::TObject3D |
Definition at line 475 of file lightweight_geom_data.h.
| class MRPTDLLIMPEXP mrpt::math::TPolygon3D |
Definition at line 474 of file lightweight_geom_data.h.
Referenced by mrpt::math::TObject3D::operator=(), and mrpt::math::TObject3D::TObject3D().
| struct MRPTDLLIMPEXP mrpt::math::TSegment3D |
Definition at line 472 of file lightweight_geom_data.h.
Referenced by mrpt::opengl::CSetOfLines::appendLine(), and mrpt::opengl::CSetOfLines::setLineByIndex().
| Page generated by Doxygen 1.6.2 for MRPT 0.8.1 SVN:exported at Mon Feb 15 22:01:07 UTC 2010 |