<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1"> <title>The MRPT project: utils.h File Reference</title> <link href="doxygen.css" rel="stylesheet" type="text/css"> <link href="tabs.css" rel="stylesheet" type="text/css"> </head><body> <div align="left"><a href="http://www.mrpt.org/">Main MRPT website</a> > <b>C++ reference</b> </div> <div align="right"> <a href="index.html"><img border="0" src="mrpt_logo.png" alt="MRPT logo"></a> </div> <!-- Generated by Doxygen 1.6.2-20100208 --> <script type="text/javascript"><!-- var searchBox = new SearchBox("searchBox", "search",false,'Search'); --></script> <div class="navigation" id="top"> <div class="tabs"> <ul> <li><a href="index.html"><span>Main Page</span></a></li> <li><a href="pages.html"><span>Related Pages</span></a></li> <li><a href="namespaces.html"><span>Namespaces</span></a></li> <li><a href="annotated.html"><span>Classes</span></a></li> <li class="current"><a href="files.html"><span>Files</span></a></li> <li> <div id="MSearchBox" class="MSearchBoxInactive"> <img id="MSearchSelect" src="search/search.png" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" alt=""/> <input type="text" id="MSearchField" value="Search" accesskey="S" onfocus="searchBox.OnSearchFieldFocus(true)" onblur="searchBox.OnSearchFieldFocus(false)" onkeyup="searchBox.OnSearchFieldChange(event)"/> <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a> </div> </li> </ul> </div> <div class="tabs"> <ul> <li><a href="files.html"><span>File List</span></a></li> <li><a href="globals.html"><span>File Members</span></a></li> </ul> </div> </div> <div class="contents"> <h1>utils.h File Reference</h1><code>#include <<a class="el" href="utils__defs_8h_source.html">mrpt/utils/utils_defs.h</a>></code><br/> <code>#include <<a class="el" href="_c_matrix_template_numeric_8h_source.html">mrpt/math/CMatrixTemplateNumeric.h</a>></code><br/> <code>#include <<a class="el" href="_c_matrix_fixed_numeric_8h_source.html">mrpt/math/CMatrixFixedNumeric.h</a>></code><br/> <code>#include <<a class="el" href="_c_vector_template_8h_source.html">mrpt/math/CVectorTemplate.h</a>></code><br/> <code>#include <<a class="el" href="_c_histogram_8h_source.html">mrpt/math/CHistogram.h</a>></code><br/> <code>#include <<a class="el" href="ops__vectors_8h_source.html">mrpt/math/ops_vectors.h</a>></code><br/> <code>#include <<a class="el" href="ops__matrices_8h_source.html">mrpt/math/ops_matrices.h</a>></code><br/> <code>#include <numeric></code><br/> <code>#include <cmath></code><br/> <div class="dynheader"> Include dependency graph for base/include/mrpt/math/utils.h:</div> <div class="dynsection"> <div class="center"><img src="base_2include_2mrpt_2math_2utils_8h__incl.png" border="0" usemap="#utils_8h_map" alt=""/></div> <map name="utils_8h_map" id="utils_8h"> <area shape="rect" id="node3" href="utils__defs_8h.html" title="mrpt/utils/utils_defs.h" alt="" coords="1029,701,1176,731"/><area shape="rect" id="node89" href="_c_matrix_template_numeric_8h.html" title="mrpt/math/CMatrixTemplateNumeric.h" alt="" coords="1595,315,1840,344"/><area shape="rect" id="node107" href="_c_histogram_8h.html" title="mrpt/math/CHistogram.h" alt="" coords="377,624,543,653"/><area shape="rect" id="node132" href="_c_matrix_fixed_numeric_8h.html" title="mrpt/math/CMatrixFixedNumeric.h" alt="" coords="2300,315,2521,344"/><area shape="rect" id="node139" href="_c_vector_template_8h.html" title="mrpt/math/CVectorTemplate.h" alt="" coords="1248,237,1445,267"/><area shape="rect" id="node145" href="ops__vectors_8h.html" title="mrpt/math/ops_vectors.h" alt="" coords="944,160,1109,189"/><area shape="rect" id="node151" href="ops__matrices_8h.html" title="This file implements miscelaneous matrix and matrix/vector operations, plus internal..." alt="" coords="1541,83,1715,112"/><area shape="rect" id="node7" href="os_8h.html" title="mrpt/system/os.h" alt="" coords="1671,779,1793,808"/><area shape="rect" id="node20" href="base_2include_2mrpt_2base_2link__pragmas_8h.html" title="mrpt/base/link_pragmas.h" alt="" coords="1033,1011,1204,1040"/><area shape="rect" id="node23" href="boost__join_8h.html" title="mrpt/utils/boost_join.h" alt="" coords="613,1088,763,1117"/><area shape="rect" id="node25" href="types_8h.html" title="mrpt/utils/types.h" alt="" coords="883,856,1005,885"/><area shape="rect" id="node73" href="smart__ptr_8hpp.html" title="mrpt/otherlibs/stlplus/smart_ptr.hpp" alt="" coords="367,779,593,808"/><area shape="rect" id="node36" href="math__frwds_8h.html" title="mrpt/math/math_frwds.h" alt="" coords="2016,933,2179,963"/><area shape="rect" id="node75" href="containers__fixes_8hpp.html" title="containers_fixes.hpp" alt="" coords="296,933,437,963"/><area shape="rect" id="node77" href="exceptions_8hpp.html" title="exceptions.hpp" alt="" coords="433,856,543,885"/><area shape="rect" id="node84" href="atomic__incr_8h.html" title="mrpt/synch/atomic_incr.h" alt="" coords="539,933,707,963"/><area shape="rect" id="node91" href="_c_matrix_template_8h.html" title="mrpt/math/CMatrixTemplate.h" alt="" coords="1620,392,1815,421"/><area shape="rect" id="node111" href="_c_serializable_8h.html" title="mrpt/utils/CSerializable.h" alt="" coords="1417,547,1585,576"/><area shape="rect" id="node116" href="matrix__iterators_8h.html" title="mrpt/math/matrix_iterators.h" alt="" coords="2073,701,2260,731"/><area shape="rect" id="node121" href="matrices__metaprogramming_8h.html" title="mrpt/math/matrices_metaprogramming.h" alt="" coords="2092,392,2348,421"/><area shape="rect" id="node124" href="_c_matrix_views_8h.html" title="Matrix "views", or wrappers around existing matrices that change the way..." alt="" coords="2200,469,2379,499"/><area shape="rect" id="node95" href="_c_array_8h.html" title="mrpt/math/CArray.h" alt="" coords="1660,469,1796,499"/><area shape="rect" id="node100" href="ops__containers_8h.html" title="This file implements several operations that operate element-wise on individual or..." alt="" coords="599,547,783,576"/><area shape="rect" id="node113" href="_c_stream_8h.html" title="mrpt/utils/CStream.h" alt="" coords="1215,624,1356,653"/><area shape="rect" id="node154" href="_c_matrix_8h.html" title="mrpt/math/CMatrix.h" alt="" coords="1557,160,1699,189"/><area shape="rect" id="node161" href="_c_matrix_d_8h.html" title="mrpt/math/CMatrixD.h" alt="" coords="1137,160,1289,189"/><area shape="rect" id="node173" href="ops__matrices__eigen_8h.html" title="This file implements eigenvalues/eigenvectors for any kind of matrix-like object..." alt="" coords="1864,315,2075,344"/></map> </div> <div class="dynheader"> This graph shows which files directly or indirectly include this file:</div> <div class="dynsection"> <div class="center"><img src="base_2include_2mrpt_2math_2utils_8h__dep__incl.png" border="0" usemap="#utils_8hdep_map" alt=""/></div> <map name="utils_8hdep_map" id="utils_8hdep"> <area shape="rect" id="node3" href="_c_kalman_filter_capable_8h.html" title="CKalmanFilterCapable.h" alt="" coords="1651,160,1813,189"/><area shape="rect" id="node48" href="jacobians_8h.html" title="jacobians.h" alt="" coords="505,83,593,112"/><area shape="rect" id="node52" href="math__mrpt_8h.html" title="math_mrpt.h" alt="" coords="448,237,541,267"/><area shape="rect" id="node58" href="_c_levenberg_marquardt_8h.html" title="CLevenbergMarquardt.h" alt="" coords="91,83,251,112"/><area shape="rect" id="node61" href="geometry_8h.html" title="geometry.h" alt="" coords="1112,83,1197,112"/><area shape="rect" id="node113" href="graphs_8h.html" title="graphs.h" alt="" coords="275,83,347,112"/><area shape="rect" id="node129" href="vision_2include_2mrpt_2vision_2utils_8h.html" title="utils.h" alt="" coords="2391,392,2447,421"/><area shape="rect" id="node5" href="bayes_8h.html" title="bayes.h" alt="" coords="804,237,871,267"/><area shape="rect" id="node33" href="_c_p_r_r_t_navigator_8h.html" title="CPRRTNavigator.h" alt="" coords="1065,624,1201,653"/><area shape="rect" id="node39" href="_c_range_bearing_k_f_s_l_a_m_8h.html" title="CRangeBearingKFSLAM.h" alt="" coords="1880,469,2059,499"/><area shape="rect" id="node42" href="_c_range_bearing_k_f_s_l_a_m2_d_8h.html" title="CRangeBearingKFSLAM2D.h" alt="" coords="1411,469,1605,499"/><area shape="rect" id="node7" href="base_8h.html" title="base.h" alt="" coords="529,315,591,344"/><area shape="rect" id="node9" href="opengl_8h.html" title="opengl.h" alt="" coords="1107,392,1176,421"/><area shape="rect" id="node11" href="_c_display_window3_d_8h.html" title="CDisplayWindow3D.h" alt="" coords="832,469,981,499"/><area shape="rect" id="node13" href="gui_8h.html" title="gui.h" alt="" coords="955,547,1005,576"/><area shape="rect" id="node26" href="_c_my_g_l_canvas_base_8h.html" title="CMyGLCanvasBase.h" alt="" coords="1184,469,1336,499"/><area shape="rect" id="node29" href="obs_8h.html" title="obs.h" alt="" coords="1107,469,1160,499"/><area shape="rect" id="node15" href="_c_reactive_navigation_system_8h.html" title="CReactiveNavigationSystem.h" alt="" coords="839,624,1041,653"/><area shape="rect" id="node19" href="vision_8h.html" title="vision.h" alt="" coords="2179,624,2245,653"/><area shape="rect" id="node17" href="reactivenav_8h.html" title="reactivenav.h" alt="" coords="988,701,1087,731"/><area shape="rect" id="node21" href="core_8h.html" title="core.h" alt="" coords="2043,779,2101,808"/><area shape="rect" id="node23" href="slam_8h.html" title="slam.h" alt="" coords="1964,701,2025,731"/><area shape="rect" id="node31" href="maps_8h.html" title="maps.h" alt="" coords="1101,547,1165,576"/><area shape="rect" id="node50" href="transform__gaussian_8h.html" title="transform_gaussian.h" alt="" coords="421,160,568,189"/><area shape="rect" id="node63" href="ransac__applications_8h.html" title="ransac_applications.h" alt="" coords="693,160,840,189"/><area shape="rect" id="node67" href="_c_disk_8h.html" title="CDisk.h" alt="" coords="1120,160,1189,189"/><area shape="rect" id="node70" href="_c_set_of_triangles_8h.html" title="CSetOfTriangles.h" alt="" coords="952,237,1083,267"/><area shape="rect" id="node76" href="_c_generalized_cylinder_8h.html" title="CGeneralizedCylinder.h" alt="" coords="1433,315,1593,344"/><area shape="rect" id="node79" href="_c_angular_observation_mesh_8h.html" title="CAngularObservationMesh.h" alt="" coords="665,315,855,344"/><area shape="rect" id="node82" href="_c_textured_object_8h.html" title="CTexturedObject.h" alt="" coords="1212,237,1343,267"/><area shape="rect" id="node90" href="_c_polyhedron_8h.html" title="CPolyhedron.h" alt="" coords="1417,237,1524,267"/><area shape="rect" id="node95" href="_c_open_g_l_standard_object_8h.html" title="COpenGLStandardObject.h" alt="" coords="864,160,1045,189"/><area shape="rect" id="node98" href="_c_height_grid_map2_d_8h.html" title="CHeightGridMap2D.h" alt="" coords="1548,237,1695,267"/><area shape="rect" id="node72" href="_c_mesh_8h.html" title="CMesh.h" alt="" coords="980,315,1055,344"/><area shape="rect" id="node84" href="_c_set_of_textured_triangles_8h.html" title="CSetOfTexturedTriangles.h" alt="" coords="1228,315,1409,344"/><area shape="rect" id="node87" href="_c_textured_plane_8h.html" title="CTexturedPlane.h" alt="" coords="1079,315,1204,344"/><area shape="rect" id="node100" href="_c_multi_metric_map_8h.html" title="CMultiMetricMap.h" alt="" coords="1769,315,1900,344"/><area shape="rect" id="node102" href="_c_local_metric_hypothesis_8h.html" title="CLocalMetricHypothesis.h" alt="" coords="1680,469,1856,499"/><area shape="rect" id="node104" href="_c_incremental_map_partitioner_8h.html" title="CIncrementalMapPartitioner.h" alt="" coords="1737,392,1932,421"/><area shape="rect" id="node115" href="dijkstra_8h.html" title="dijkstra.h" alt="" coords="272,160,347,189"/><area shape="rect" id="node119" href="_c_network_of_poses_8h.html" title="CNetworkOfPoses.h" alt="" coords="5,160,147,189"/><area shape="rect" id="node121" href="poses_8h.html" title="poses.h" alt="" coords="357,237,424,267"/><area shape="rect" id="node126" href="graph__slam_8h.html" title="graph_slam.h" alt="" coords="141,392,240,421"/><area shape="rect" id="node131" href="_c_feature_extraction_8h.html" title="CFeatureExtraction.h" alt="" coords="2571,469,2717,499"/><area shape="rect" id="node142" href="pinhole_8h.html" title="pinhole.h" alt="" coords="2495,547,2569,576"/><area shape="rect" id="node145" href="_c_cam_model_8h.html" title="CCamModel.h" alt="" coords="2159,547,2265,576"/><area shape="rect" id="node148" href="_c_video_file_writer_8h.html" title="CVideoFileWriter.h" alt="" coords="2289,547,2420,576"/><area shape="rect" id="node133" href="_c_grid_map_aligner_8h.html" title="CGridMapAligner.h" alt="" coords="2592,624,2723,653"/><area shape="rect" id="node136" href="_c_occupancy_grid_map_feature_extractor_8h.html" title="COccupancyGridMapFeatureExtractor.h" alt="" coords="2695,547,2948,576"/></map> </div> <p><a href="base_2include_2mrpt_2math_2utils_8h_source.html">Go to the source code of this file.</a></p> <table border="0" cellpadding="0" cellspacing="0"> <tr><td colspan="2"><h2>Namespaces</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt.html">mrpt</a></td></tr> <p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>This is the global namespace for all Mobile Robot Programming Toolkit (MRPT) libraries. </p> <br/></td></tr> </p> <tr><td class="memItemLeft" align="right" valign="top">namespace </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html">mrpt::math</a></td></tr> <p><tr><td class="mdescLeft"> </td><td class="mdescRight"><p>This base provides a set of functions for maths stuff. </p> <br/></td></tr> </p> <tr><td colspan="2"><h2>Functions</h2></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a40e8e47dea9f504a28d2a70ea8ddb158">mrpt::math::loadVector</a> (utils::CFileStream &f, std::vector< int > &d)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Loads one row of a text file as a numerical std::vector. <a href="#a40e8e47dea9f504a28d2a70ea8ddb158"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a4b6641faf04526ff4cee645370007ae1">mrpt::math::loadVector</a> (utils::CFileStream &f, std::vector< double > &d)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Loads one row of a text file as a numerical std::vector. <a href="#a4b6641faf04526ff4cee645370007ae1"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a0789f5c3dde7a158cb9780f6061ddcc6">mrpt::math::isNaN</a> (float f) MRPT_NO_THROWS</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the number is NaN. <a href="#a0789f5c3dde7a158cb9780f6061ddcc6"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#af51d0919fb678849dd010440fc6c7e3d">mrpt::math::isNaN</a> (double f) MRPT_NO_THROWS</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the number is NaN. <a href="#af51d0919fb678849dd010440fc6c7e3d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#af4a419952a205931911e0a5627a192fe">mrpt::math::isFinite</a> (float f) MRPT_NO_THROWS</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the number is non infinity. <a href="#af4a419952a205931911e0a5627a192fe"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">bool BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a2ebfac97f79a8835217cccf46b1e229f">mrpt::math::isFinite</a> (double f) MRPT_NO_THROWS</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Returns true if the number is non infinity. <a href="#a2ebfac97f79a8835217cccf46b1e229f"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , typename K > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#af2fe0cbaaea87f6cfe3754f09e85107b">mrpt::math::linspace</a> (T first, T last, size_t count, std::vector< K > &out_vector)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points. <a href="#af2fe0cbaaea87f6cfe3754f09e85107b"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ac8f80d72dcbdee5d2e5f20be9463f0d4">mrpt::math::linspace</a> (T first, T last, size_t count)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates an equidistant sequence of numbers given the first one, the last one and the desired number of points. <a href="#ac8f80d72dcbdee5d2e5f20be9463f0d4"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T , T STEP> </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a2778a8538638098c0b8ac89ff8f77bfe">mrpt::math::sequence</a> (T first, size_t length)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a sequence of values [first,first+STEP,first+2*STEP,. <a href="#a2778a8538638098c0b8ac89ff8f77bfe"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a9b252fa16014e886104f8065091f6b20">mrpt::math::ones</a> (size_t count)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a vector of all ones of the given length. <a href="#a9b252fa16014e886104f8065091f6b20"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a4d194e83c716310064baac5cf375d5d3">mrpt::math::zeros</a> (size_t count)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a vector of all zeros of the given length. <a href="#a4d194e83c716310064baac5cf375d5d3"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a63f0941328a709254c00147881525d62">mrpt::math::wrapTo2PiInPlace</a> (T &a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Modifies the given angle to translate it into the [0,2pi[ range. <a href="#a63f0941328a709254c00147881525d62"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ae47d6345832411712f6f029c774b7acc">mrpt::math::wrapTo2Pi</a> (T a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Modifies the given angle to translate it into the [0,2pi[ range. <a href="#ae47d6345832411712f6f029c774b7acc"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a28d2bd3941f3afd01f91ad31632fbe58">mrpt::math::wrapToPi</a> (T a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Modifies the given angle to translate it into the ]-pi,pi] range. <a href="#a28d2bd3941f3afd01f91ad31632fbe58"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#af3c7288572a603de6792159c491d36ea">mrpt::math::wrapToPiInPlace</a> (T &a)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Modifies the given angle to translate it into the ]-pi,pi] range. <a href="#af3c7288572a603de6792159c491d36ea"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a091f9b51386810a23689fda6360862dc">mrpt::math::normalize</a> (const std::vector< T > &v, std::vector< T > &out_v)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Normalize a vector, such as its norm is the unity. <a href="#a091f9b51386810a23689fda6360862dc"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTOR_OF_VECTOR , class VECTORLIKE , class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ab7f55ad571c5d8bc95995dcf2f48adff">mrpt::math::meanAndCovVector</a> (const VECTOR_OF_VECTOR &v, VECTORLIKE &out_mean, MATRIXLIKE &out_cov)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the mean vector and covariance from a list of values given as a vector of vectors, where each row is a sample. <a href="#ab7f55ad571c5d8bc95995dcf2f48adff"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTOR_OF_VECTOR > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">CMatrixDouble </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a1e15137cfe79855f26e74f84fe9eb089">mrpt::math::covVector</a> (const VECTOR_OF_VECTOR &v)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the covariance matrix from a list of values given as a vector of vectors, where each row is a sample. <a href="#a1e15137cfe79855f26e74f84fe9eb089"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTOR_OF_VECTORS , class MATRIXLIKE , class VECTORLIKE , class VECTORLIKE2 , class VECTORLIKE3 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a52234e08a658a81ded4a6fd932dd7e30">mrpt::math::covariancesAndMeanWeighted</a> (const VECTOR_OF_VECTORS &elements, MATRIXLIKE &covariances, VECTORLIKE &means, const VECTORLIKE2 *weights_mean, const VECTORLIKE3 *weights_cov, const bool *elem_do_wrap2pi=NULL)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes covariances and mean of any vector of containers, given optional weights for the different samples. <a href="#a52234e08a658a81ded4a6fd932dd7e30"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTOR_OF_VECTORS , class MATRIXLIKE , class VECTORLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a9ed2005589fa01a91063e4008cf055ca">mrpt::math::covariancesAndMean</a> (const VECTOR_OF_VECTORS &elements, MATRIXLIKE &covariances, VECTORLIKE &means, const bool *elem_do_wrap2pi=NULL)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes covariances and mean of any vector of containers. <a href="#a9ed2005589fa01a91063e4008cf055ca"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE1 , class VECTORLIKE2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a9bf7414c05e0d04af0af80a619179991">mrpt::math::weightedHistogram</a> (const VECTORLIKE1 &values, const VECTORLIKE1 &weights, float binWidth, VECTORLIKE2 &out_binCenters, VECTORLIKE2 &out_binValues)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the weighted histogram for a vector of values and their corresponding weights. <a href="#a9bf7414c05e0d04af0af80a619179991"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE1 , class VECTORLIKE2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ac085bbebb9dc4a6656c558b7db6236eb">mrpt::math::weightedHistogramLog</a> (const VECTORLIKE1 &values, const VECTORLIKE1 &log_weights, float binWidth, VECTORLIKE2 &out_binCenters, VECTORLIKE2 &out_binValues)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the weighted histogram for a vector of values and their corresponding log-weights. <a href="#ac085bbebb9dc4a6656c558b7db6236eb"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTOR_OF_VECTORS , class VECTORLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a772e54a8aacb068395f9823a90d8df50">mrpt::math::extractColumnFromVectorOfVectors</a> (const size_t colIndex, const VECTOR_OF_VECTORS &data, VECTORLIKE &out_column)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Extract a column from a vector of vectors, and store it in another vector. <a href="#a772e54a8aacb068395f9823a90d8df50"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">uint64_t BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#abde7e0c25e9bb6a0a962f8051fe8c19d">mrpt::math::factorial64</a> (unsigned int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the factorial of an integer number and returns it as a 64-bit integer number. <a href="#abde7e0c25e9bb6a0a962f8051fe8c19d"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a2fbe27097242531b344c8d5b9fe148c9">mrpt::math::factorial</a> (unsigned int n)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the factorial of an integer number and returns it as a double value (internally it uses logarithms for avoiding overflow). <a href="#a2fbe27097242531b344c8d5b9fe148c9"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#aafcf18a2df3abddbd5bfd8b0229961ee">mrpt::math::round2up</a> (T val)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Round up to the nearest power of two of a given number. <a href="#aafcf18a2df3abddbd5bfd8b0229961ee"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a251e4c9ee701b2c44198ffd4006ed4d9">mrpt::math::round_10power</a> (T val, int power10)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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, . <a href="#a251e4c9ee701b2c44198ffd4006ed4d9"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">double </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#aae4ddf66a7d01007836ff2c8e3d7910d">mrpt::math::correlate_matrix</a> (const CMatrixTemplateNumeric< T > &a1, const CMatrixTemplateNumeric< T > &a2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Calculate the correlation between two matrices (by AJOGD @ JAN-2007). <a href="#aae4ddf66a7d01007836ff2c8e3d7910d"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void BASE_IMPEXP </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a004386d872f542d391f8a449bbd9ef1a">mrpt::math::qr_decomposition</a> (CMatrixTemplateNumeric< T > &A, CMatrixTemplateNumeric< T > &R, CMatrixTemplateNumeric< T > &Q, CVectorTemplate< T > &c, int &sing)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Matrix QR decomposition. <a href="#a004386d872f542d391f8a449bbd9ef1a"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void BASE_IMPEXP </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a8b5f7e92f514f455254b3624da74256c">mrpt::math::UpdateCholesky</a> (CMatrixTemplateNumeric< T > &chol, CVectorTemplate< T > &r1Modification)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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. <a href="#a8b5f7e92f514f455254b3624da74256c"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6f3b83189d83180f5208b63ba5893100">mrpt::math::computeEigenValues2x2</a> (const CMatrixFloat &in_matrix, float &min_eigenvalue, float &max_eigenvalue)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Compute the two eigenvalues of a 2x2 matrix. <a href="#a6f3b83189d83180f5208b63ba5893100"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6cb458d9d6c45fae59084fc57e88666b">mrpt::math::averageLogLikelihood</a> (const vector_double &logLikelihoods)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A numerically-stable method to compute average likelihood values with strongly different ranges (unweighted likelihoods: compute the arithmetic mean). <a href="#a6cb458d9d6c45fae59084fc57e88666b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a3bd9ff688b42b58bd8c2f5d6f420868f">mrpt::math::averageWrap2Pi</a> (const vector_double &angles)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the average of a sequence of angles in radians taking into account the correct wrapping in the range <img class="formulaInl" alt="$ ]-\pi,\pi [ $" src="form_51.png"/>, for example, the mean of (2,-2) is <img class="formulaInl" alt="$ \pi $" src="form_52.png"/>, not 0. <a href="#a3bd9ff688b42b58bd8c2f5d6f420868f"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#aecd0c40688b7bd9e4554e8180f05f07a">mrpt::math::averageLogLikelihood</a> (const vector_double &logWeights, const vector_double &logLikelihoods)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A numerically-stable method to average likelihood values with strongly different ranges (weighted likelihoods). <a href="#aecd0c40688b7bd9e4554e8180f05f07a"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">std::string BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a96a2265441098c93f3388951c7e5339c">mrpt::math::MATLAB_plotCovariance2D</a> (const CMatrixFloat &cov22, const CVectorFloat &mean, const float &stdCount, const std::string &style=std::string("b"), const size_t &nEllipsePoints=30)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Generates a string with the MATLAB commands required to plot an confidence interval (ellipse) for a 2D Gaussian ('float' version). <a href="#a96a2265441098c93f3388951c7e5339c"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class MATRIXLIKE1 , class MATRIXLIKE2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top"> </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ada8c6a6c8b66ca4e7b0cd30a1673cabb">mrpt::math::RET_VOID_ASSERT_MRPTMATRICES</a> (MATRIXLIKE1, MATRIXLIKE2) homogeneousMatrixInverse(const MATRIXLIKE1 &M</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Efficiently compute the inverse of a 4x4 homogeneous matrix by only transposing the rotation 3x3 part and solving the translation with dot products. <a href="#ada8c6a6c8b66ca4e7b0cd30a1673cabb"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">class VECTORLIKE3 class <br class="typebreak"/> MATRIXLIKE class USERPARAM <br class="typebreak"/> void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a470380f4563a26d6fe05e8456afebeda">mrpt::math::estimateJacobian</a> (const VECTORLIKE &x, void(*functor)(const VECTORLIKE &x, const USERPARAM &y, VECTORLIKE3 &out), const VECTORLIKE2 &increments, const USERPARAM &userParam, MATRIXLIKE &out_Jacobian)</td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , typename At , size_t N> </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > & </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a5ef59eb64a2bdf451a4e7e2a457045a0">mrpt::math::loadVector</a> (std::vector< T > &v, At(&theArray)[N])</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Assignment operator for initializing a std::vector from a C array (The vector will be automatically set to the correct size). <a href="#a5ef59eb64a2bdf451a4e7e2a457045a0"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">void </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6b94c41c7406e0d606111a7b771b72e0">mrpt::math::unwrap2PiSequence</a> (vector_double &x)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Modify a sequence of angle values such as no consecutive values have a jump larger than PI in absolute value. <a href="#a6b94c41c7406e0d606111a7b771b72e0"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<size_t N, typename T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">std::vector< T > </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a816638baf88338f71838c60b6a392707">mrpt::math::make_vector</a> (const T val1,...)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">A versatile template to build vectors on-the-fly in a style close to MATLAB's v=[a b c d . <a href="#a816638baf88338f71838c60b6a392707"></a><br/></td></tr> <tr><td colspan="2"><div class="groupHeader">Interpolation functions</div></td></tr> <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpa5104052c708f848ff96176af3bae8a2"></a> </p> </div></td></tr> <tr><td class="memTemplParams" colspan="2">template<class T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#aa94b40599b9bca0808afe97bf8cb84c8">mrpt::math::interpolate</a> (const T &x, const std::vector< T > &ys, const T &x0, const T &x1)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Interpolate a data sequence "ys" ranging from "x0" to "x1" (equally spaced), to obtain the approximation of the sequence at the point "x". <a href="#aa94b40599b9bca0808afe97bf8cb84c8"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a199ae09bf97644048fe53590964abd1b">mrpt::math::interpolate2points</a> (const double x, const double x0, const double y0, const double x1, const double y1, bool wrap2pi=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Linear interpolation/extrapolation: evaluates at "x" the line (x0,y0)-(x1,y1). <a href="#a199ae09bf97644048fe53590964abd1b"></a><br/></td></tr> <tr><td class="memItemLeft" align="right" valign="top">double BASE_IMPEXP </td><td class="memItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a43125e4a8a9b7f33c66a55645fe5f0cf">mrpt::math::spline</a> (const double t, const std::vector< double > &x, const std::vector< double > &y, bool wrap2pi=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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). <a href="#a43125e4a8a9b7f33c66a55645fe5f0cf"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename NUMTYPE , class VECTORLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">NUMTYPE </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a25fa2d8b0c20370e79b17eb6bf4c7024">mrpt::math::leastSquareLinearFit</a> (const NUMTYPE t, const VECTORLIKE &x, const VECTORLIKE &y, bool wrap2pi=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Interpolates or extrapolates using a least-square linear fit of the set of values "x" and "y", evaluated at a single point "t". <a href="#a25fa2d8b0c20370e79b17eb6bf4c7024"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE1 , class VECTORLIKE2 , class VECTORLIKE3 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#aeb6b0124cceebe60a0bbd02fbb68b38a">mrpt::math::leastSquareLinearFit</a> (const VECTORLIKE1 &ts, VECTORLIKE2 &outs, const VECTORLIKE3 &x, const VECTORLIKE3 &y, bool wrap2pi=false)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">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". <a href="#aeb6b0124cceebe60a0bbd02fbb68b38a"></a><br/></td></tr> <tr><td colspan="2"><div class="groupHeader">Probability density distributions (pdf) distance metrics</div></td></tr> <tr><td colspan="2"><div class="groupText"><p><a class="anchor" id="amgrpdb2daf45b16b18c4afdb9c6e8421ce62"></a> </p> </div></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE1 , class VECTORLIKE2 , class MAT > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">VECTORLIKE1::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a53f4c3a4bf3e33ed4c7d3a2fb0e88940">mrpt::math::mahalanobisDistance2</a> (const VECTORLIKE1 &X, const VECTORLIKE2 &MU, const MAT &COV)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the squared mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv </p> <p class="formulaDsp"> <img class="formulaDsp" alt="\[ d^2 = (X-MU)^\top \Sigma^{-1} (X-MU) \]" src="form_54.png"/> </p> <p>. <a href="#a53f4c3a4bf3e33ed4c7d3a2fb0e88940"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE1 , class VECTORLIKE2 , class MAT > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">VECTORLIKE1::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a4cd811ce384b89dcde154df501ea75ba">mrpt::math::mahalanobisDistance</a> (const VECTORLIKE1 &X, const VECTORLIKE2 &MU, const MAT &COV)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the mahalanobis distance of a vector X given the mean MU and the covariance *inverse* COV_inv </p> <p class="formulaDsp"> <img class="formulaDsp" alt="\[ d = \sqrt{ (X-MU)^\top \Sigma^{-1} (X-MU) } \]" src="form_55.png"/> </p> <p>. <a href="#a4cd811ce384b89dcde154df501ea75ba"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE , class MAT1 , class MAT2 , class MAT3 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">VECTORLIKE::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ab21830875035b515702e4c682c9da806">mrpt::math::mahalanobisDistance2</a> (const VECTORLIKE &mean_diffs, const MAT1 &COV1, const MAT2 &COV2, const MAT3 &CROSS_COV12)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the squared mahalanobis distance between two *non-independent* Gaussians, given the two covariance matrices and the vector with the difference of their means. <a href="#ab21830875035b515702e4c682c9da806"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE , class MAT1 , class MAT2 , class MAT3 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">VECTORLIKE::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#adeaba1cf641db3280a1505f8e8ed2e1e">mrpt::math::mahalanobisDistance</a> (const VECTORLIKE &mean_diffs, const MAT1 &COV1, const MAT2 &COV2, const MAT3 &CROSS_COV12)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the mahalanobis distance between two *non-independent* Gaussians (or independent if CROSS_COV12=NULL), given the two covariance matrices and the vector with the difference of their means. <a href="#adeaba1cf641db3280a1505f8e8ed2e1e"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE , class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">MATRIXLIKE::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#abee66a02cce54891990d9e6070003c86">mrpt::math::mahalanobisDistance2</a> (const VECTORLIKE &delta_mu, const MATRIXLIKE &cov)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the squared mahalanobis distance between a point and a Gaussian, given the covariance matrix and the vector with the difference between the mean and the point. <a href="#abee66a02cce54891990d9e6070003c86"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<class VECTORLIKE , class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">MATRIXLIKE::value_type </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6606b022b617b31c015638abe5b7cf7a">mrpt::math::mahalanobisDistance</a> (const VECTORLIKE &delta_mu, const MATRIXLIKE &cov)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the mahalanobis distance between a point and a Gaussian, given the covariance matrix and the vector with the difference between the mean and the point. <a href="#a6606b022b617b31c015638abe5b7cf7a"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6394e8aa0763af3ee3e58f4d1a57b07b">mrpt::math::productIntegralTwoGaussians</a> (const std::vector< T > &mean_diffs, const CMatrixTemplateNumeric< T > &COV1, const CMatrixTemplateNumeric< T > &COV2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2". <a href="#a6394e8aa0763af3ee3e58f4d1a57b07b"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , size_t DIM> </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">T </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a5969b4519634e57c2b31a99ec5f576db">mrpt::math::productIntegralTwoGaussians</a> (const std::vector< T > &mean_diffs, const CMatrixFixedNumeric< T, DIM, DIM > &COV1, const CMatrixFixedNumeric< T, DIM, DIM > &COV2)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes the integral of the product of two Gaussians, with means separated by "mean_diffs" and covariances "COV1" and "COV2". <a href="#a5969b4519634e57c2b31a99ec5f576db"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , class VECLIKE , class MATLIKE1 , class MATLIKE2 > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ab1134acbd0e3851e111d7003d88b0984">mrpt::math::productIntegralAndMahalanobisTwoGaussians</a> (const VECLIKE &mean_diffs, const MATLIKE1 &COV1, const MATLIKE2 &COV2, T &maha2_out, T &intprod_out, const MATLIKE1 *CROSS_COV12=NULL)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes both, the integral of the product of two Gaussians and their square Mahalanobis distance. <a href="#ab1134acbd0e3851e111d7003d88b0984"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , class VECLIKE , class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#a6fcc3623c84f0b50ba868882606a18e5">mrpt::math::mahalanobisDistance2AndLogPDF</a> (const VECLIKE &diff_mean, const MATRIXLIKE &cov, T &maha2_out, T &log_pdf_out)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes both, the logarithm of the PDF and the square Mahalanobis distance between a point (given by its difference wrt the mean) and a Gaussian. <a href="#a6fcc3623c84f0b50ba868882606a18e5"></a><br/></td></tr> <tr><td class="memTemplParams" colspan="2">template<typename T , class VECLIKE , class MATRIXLIKE > </td></tr> <tr><td class="memTemplItemLeft" align="right" valign="top">void </td><td class="memTemplItemRight" valign="bottom"><a class="el" href="namespacemrpt_1_1math.html#ada235c3a883ebebac5ba4b6e1c5d8b04">mrpt::math::mahalanobisDistance2AndPDF</a> (const VECLIKE &diff_mean, const MATRIXLIKE &cov, T &maha2_out, T &pdf_out)</td></tr> <tr><td class="mdescLeft"> </td><td class="mdescRight">Computes both, the PDF and the square Mahalanobis distance between a point (given by its difference wrt the mean) and a Gaussian. <a href="#ada235c3a883ebebac5ba4b6e1c5d8b04"></a><br/></td></tr> </table> </div> <!--- window showing the filter options --> <div id="MSearchSelectWindow" onmouseover="return searchBox.OnSearchSelectShow()" onmouseout="return searchBox.OnSearchSelectHide()" onkeydown="return searchBox.OnSearchSelectKey(event)"> <a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark"> </span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark"> </span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark"> </span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark"> </span>Files</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark"> </span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark"> </span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark"> </span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark"> </span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark"> </span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark"> </span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark"> </span>Defines</a></div> <!-- iframe showing the search results (closed by default) --> <div id="MSearchResultsWindow"> <iframe src="" frameborder="0" name="MSearchResults" id="MSearchResults"> </iframe> </div> <br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.6.2-20100208</a> for MRPT 0.9.0 SVN: at Wed Jul 14 12:48:09 UTC 2010</td><td></td> <td width="100"> </td> <td width="150"> </td></tr> </table> </body></html>