Sophie

Sophie

distrib > Fedora > 16 > i386 > by-pkgid > 4bc66056a634db26a1f4d0845dc41ca6 > files > 11366

mrpt-doc-0.9.5-0.1.20110925svn2670.fc16.i686.rpm

<!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>math_frwds.h Source File</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> &gt; <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.7.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="pages.html"><span>Related&#160;Pages</span></a></li>
      <li><a href="modules.html"><span>Modules</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">
          <div class="left">
            <form id="FSearchBox" action="search.php" method="get">
              <img id="MSearchSelect" src="search/mag.png" alt=""/>
              <input type="text" id="MSearchField" name="query" value="Search" size="20" accesskey="S" 
                     onfocus="searchBox.OnSearchFieldFocus(true)" 
                     onblur="searchBox.OnSearchFieldFocus(false)"/>
            </form>
          </div><div class="right"></div>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<div class="header">
  <div class="headertitle">
<div class="title">math_frwds.h</div>  </div>
</div>
<div class="contents">
<a href="math__frwds_8h.html">Go to the documentation of this file.</a><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/* +---------------------------------------------------------------------------+</span>
<a name="l00002"></a>00002 <span class="comment">   |          The Mobile Robot Programming Toolkit (MRPT) C++ library          |</span>
<a name="l00003"></a>00003 <span class="comment">   |                                                                           |</span>
<a name="l00004"></a>00004 <span class="comment">   |                       http://www.mrpt.org/                                |</span>
<a name="l00005"></a>00005 <span class="comment">   |                                                                           |</span>
<a name="l00006"></a>00006 <span class="comment">   |   Copyright (C) 2005-2011  University of Malaga                           |</span>
<a name="l00007"></a>00007 <span class="comment">   |                                                                           |</span>
<a name="l00008"></a>00008 <span class="comment">   |    This software was written by the Machine Perception and Intelligent    |</span>
<a name="l00009"></a>00009 <span class="comment">   |      Robotics Lab, University of Malaga (Spain).                          |</span>
<a name="l00010"></a>00010 <span class="comment">   |    Contact: Jose-Luis Blanco  &lt;jlblanco@ctima.uma.es&gt;                     |</span>
<a name="l00011"></a>00011 <span class="comment">   |                                                                           |</span>
<a name="l00012"></a>00012 <span class="comment">   |  This file is part of the MRPT project.                                   |</span>
<a name="l00013"></a>00013 <span class="comment">   |                                                                           |</span>
<a name="l00014"></a>00014 <span class="comment">   |     MRPT is free software: you can redistribute it and/or modify          |</span>
<a name="l00015"></a>00015 <span class="comment">   |     it under the terms of the GNU General Public License as published by  |</span>
<a name="l00016"></a>00016 <span class="comment">   |     the Free Software Foundation, either version 3 of the License, or     |</span>
<a name="l00017"></a>00017 <span class="comment">   |     (at your option) any later version.                                   |</span>
<a name="l00018"></a>00018 <span class="comment">   |                                                                           |</span>
<a name="l00019"></a>00019 <span class="comment">   |   MRPT is distributed in the hope that it will be useful,                 |</span>
<a name="l00020"></a>00020 <span class="comment">   |     but WITHOUT ANY WARRANTY; without even the implied warranty of        |</span>
<a name="l00021"></a>00021 <span class="comment">   |     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         |</span>
<a name="l00022"></a>00022 <span class="comment">   |     GNU General Public License for more details.                          |</span>
<a name="l00023"></a>00023 <span class="comment">   |                                                                           |</span>
<a name="l00024"></a>00024 <span class="comment">   |     You should have received a copy of the GNU General Public License     |</span>
<a name="l00025"></a>00025 <span class="comment">   |     along with MRPT.  If not, see &lt;http://www.gnu.org/licenses/&gt;.         |</span>
<a name="l00026"></a>00026 <span class="comment">   |                                                                           |</span>
<a name="l00027"></a>00027 <span class="comment">   +---------------------------------------------------------------------------+ */</span>
<a name="l00028"></a>00028 <span class="preprocessor">#ifndef mrpt_math_forwddecls_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define mrpt_math_forwddecls_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;mrpt/config.h&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html">mrpt/base/link_pragmas.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;cmath&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;cstdlib&gt;</span>
<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;algorithm&gt;</span>
<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;string&gt;</span>
<a name="l00037"></a>00037 <span class="comment"></span>
<a name="l00038"></a>00038 <span class="comment">/*! \file math_frwds.h</span>
<a name="l00039"></a>00039 <span class="comment">  * Forward declarations of all mrpt::math classes related to vectors, arrays and matrices.</span>
<a name="l00040"></a>00040 <span class="comment">  * Many of the function implementations are in ops_matrices.h, others in ops_containers.h</span>
<a name="l00041"></a>00041 <span class="comment">  */</span>
<a name="l00042"></a>00042 
<a name="l00043"></a>00043 <span class="keyword">namespace </span>mrpt
<a name="l00044"></a>00044 {
<a name="l00045"></a>00045         <span class="keyword">namespace </span>utils
<a name="l00046"></a>00046         {
<a name="l00047"></a><a class="code" href="namespacemrpt_1_1utils.html#a4aa6d0388c837d159ca801e48d601449">00047</a>                 <span class="keyword">class </span><a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="classmrpt_1_1utils_1_1_c_stream.html" title="This base class is used to provide a unified interface to files,memory buffers,..Please see the deriv...">CStream</a>;
<a name="l00048"></a>00048                 <span class="keyword">template</span>&lt;<span class="keyword">class</span> T&gt; <span class="keyword">inline</span> T <a class="code" href="namespacemrpt_1_1utils.html#a67cb05bb8ad4e725875a7ee54b7042ae" title="Inline function for the square of a number.">square</a>(<span class="keyword">const</span> T x);
<a name="l00049"></a>00049         }
<a name="l00050"></a>00050 
<a name="l00051"></a><a class="code" href="namespacemrpt_1_1system.html">00051</a>         <span class="keyword">namespace </span>system
<a name="l00052"></a>00052         {
<a name="l00053"></a>00053                 std::string <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="group__mrpt__system__os.html#ga8fe63df666e65644f220e175df15c8ab" title="Returns a string describing the MRPT version including the SVN number.">MRPT_getVersion</a>();
<a name="l00054"></a>00054         }
<a name="l00055"></a>00055 
<a name="l00056"></a>00056         <span class="keyword">namespace </span>poses
<a name="l00057"></a>00057         {
<a name="l00058"></a>00058                 <span class="keyword">class </span>CPoint2D;
<a name="l00059"></a>00059                 <span class="keyword">class </span>CPoint3D;
<a name="l00060"></a>00060                 <span class="keyword">class </span>CPose2D;
<a name="l00061"></a>00061                 <span class="keyword">class </span>CPose3D;
<a name="l00062"></a>00062                 <span class="keyword">class </span><a class="code" href="namespacemrpt_1_1poses.html#a1d4ae634d5f0417a36ca15a4d928300d">CPose3DQuat</a>;
<a name="l00063"></a>00063         }
<a name="l00064"></a>00064 
<a name="l00065"></a>00065         <span class="keyword">namespace </span>math
<a name="l00066"></a>00066         {
<a name="l00067"></a>00067                 <span class="keyword">struct </span>TPoint2D;
<a name="l00068"></a>00068                 <span class="keyword">struct </span>TPoint3D;
<a name="l00069"></a>00069                 <span class="keyword">struct </span>TPose2D;
<a name="l00070"></a>00070                 <span class="keyword">struct </span>TPose3D;
<a name="l00071"></a>00071                 <span class="keyword">struct </span>TPose3DQuat;
<a name="l00072"></a>00072 
<a name="l00073"></a>00073                 <span class="keyword">namespace </span>detail
<a name="l00074"></a>00074                 {<span class="comment"></span>
<a name="l00075"></a>00075 <span class="comment">                        /** Internal resize which compiles to nothing on fixed-size matrices. */</span>
<a name="l00076"></a>00076                         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> MAT,<span class="keywordtype">int</span> TypeSizeAtCompileTime&gt;
<a name="l00077"></a>00077                         <span class="keyword">struct </span>TAuxResizer {
<a name="l00078"></a><a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer.html#aff1f86d52ea00e0c93925c4f6dc46d94">00078</a>                                 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer.html#aff1f86d52ea00e0c93925c4f6dc46d94">internal_resize</a>(MAT &amp;obj, <span class="keywordtype">size_t</span> row, <span class="keywordtype">size_t</span> col) { }
<a name="l00079"></a><a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer.html#a75c34c5171cc96d203578a1625786694">00079</a>                                 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer.html#a75c34c5171cc96d203578a1625786694">internal_resize</a>(MAT &amp;obj, <span class="keywordtype">size_t</span> nsize) { }
<a name="l00080"></a>00080                         };
<a name="l00081"></a>00081                         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> MAT&gt;
<a name="l00082"></a>00082                         <span class="keyword">struct </span>TAuxResizer&lt;MAT,-1&gt; {
<a name="l00083"></a><a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer_3_01_m_a_t_00-1_01_4.html#a631bdb514e03b500a5c3421721745bee">00083</a>                                 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer_3_01_m_a_t_00-1_01_4.html#a631bdb514e03b500a5c3421721745bee">internal_resize</a>(MAT &amp;obj, <span class="keywordtype">size_t</span> row, <span class="keywordtype">size_t</span> col) { obj.derived().conservativeResize(row,col); }
<a name="l00084"></a><a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer_3_01_m_a_t_00-1_01_4.html#a5167d774fa3a2a43c0557bc0e69f06c1">00084</a>                                 <span class="keyword">static</span> <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="structmrpt_1_1math_1_1detail_1_1_t_aux_resizer_3_01_m_a_t_00-1_01_4.html#a5167d774fa3a2a43c0557bc0e69f06c1">internal_resize</a>(MAT &amp;obj, <span class="keywordtype">size_t</span> nsize) { obj.derived().conservativeResize(nsize); }
<a name="l00085"></a>00085                         };
<a name="l00086"></a>00086                 }
<a name="l00087"></a>00087 
<a name="l00088"></a>00088 <span class="comment"></span>
<a name="l00089"></a>00089 <span class="comment">                /*! Selection of the number format in CMatrixTemplate::saveToTextFile</span>
<a name="l00090"></a>00090 <span class="comment">                  */</span>
<a name="l00091"></a><a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85">00091</a>                 <span class="keyword">enum</span> <a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85">TMatrixTextFileFormat</a>
<a name="l00092"></a>00092                 {
<a name="l00093"></a><a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85a40e11335e625d349cfb19366b9d23e04">00093</a>                         <a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85a40e11335e625d349cfb19366b9d23e04" title="engineering format &#39;e&#39;">MATRIX_FORMAT_ENG</a> = 0,   <span class="comment">//!&lt; engineering format &#39;%e&#39;</span>
<a name="l00094"></a><a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85a417d954dbfac48470b7bbe455784ec19">00094</a> <span class="comment"></span>                        <a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85a417d954dbfac48470b7bbe455784ec19" title="fixed floating point &#39;f&#39;">MATRIX_FORMAT_FIXED</a> = 1, <span class="comment">//!&lt; fixed floating point &#39;%f&#39;</span>
<a name="l00095"></a><a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85ac1fe98ff9b96269a607dc3ae8f0edbe5">00095</a> <span class="comment"></span>                        <a class="code" href="namespacemrpt_1_1math.html#a5c655254dc91e1e5e5b7e43ab7572d85ac1fe98ff9b96269a607dc3ae8f0edbe5" title="intergers &#39;i&#39;">MATRIX_FORMAT_INT</a> = 2    <span class="comment">//!&lt; intergers &#39;%i&#39;</span>
<a name="l00096"></a>00096 <span class="comment"></span>                };
<a name="l00097"></a>00097 <span class="comment"></span>
<a name="l00098"></a>00098 <span class="comment">                /** For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes), if it&#39;s not required</span>
<a name="l00099"></a>00099 <span class="comment">                     to fill it with zeros at the constructor to save time. */</span>
<a name="l00100"></a><a class="code" href="namespacemrpt_1_1math.html#a27e8ae8971ff5aa1c39f1f9be334d73a">00100</a>                 <span class="keyword">enum</span> <a class="code" href="namespacemrpt_1_1math.html#a27e8ae8971ff5aa1c39f1f9be334d73a" title="For usage in one of the constructors of CMatrixFixedNumeric or CMatrixTemplate (and derived classes)...">TConstructorFlags_Matrices</a>
<a name="l00101"></a>00101                 {
<a name="l00102"></a><a class="code" href="namespacemrpt_1_1math.html#a27e8ae8971ff5aa1c39f1f9be334d73aa28acc66160006cb691487ec89f8d266d">00102</a>                         <a class="code" href="namespacemrpt_1_1math.html#a27e8ae8971ff5aa1c39f1f9be334d73aa28acc66160006cb691487ec89f8d266d">UNINITIALIZED_MATRIX</a> = 0
<a name="l00103"></a>00103                 };
<a name="l00104"></a>00104 
<a name="l00105"></a>00105                 <span class="comment">// ---------------- Forward declarations: Classes ----------------</span>
<a name="l00106"></a>00106                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>CMatrixTemplate;
<a name="l00107"></a>00107                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; <span class="keyword">class </span>CMatrixTemplateObjects;
<a name="l00108"></a>00108 
<a name="l00109"></a><a class="code" href="math__frwds_8h.html#a62ee3e474e8ff7287af332daa529f7f8">00109</a> <span class="preprocessor">#define MRPT_MATRIX_CONSTRUCTORS_FROM_POSES(_CLASS_) \</span>
<a name="l00110"></a>00110 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::math::TPose2D &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00111"></a>00111 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::math::TPose3D &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00112"></a>00112 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::math::TPose3DQuat &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00113"></a>00113 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::math::TPoint2D &amp;p) { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00114"></a>00114 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::math::TPoint3D &amp;p) { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00115"></a>00115 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::poses::CPose2D &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00116"></a>00116 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::poses::CPose3D &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00117"></a>00117 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::poses::CPose3DQuat &amp;p)  { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00118"></a>00118 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::poses::CPoint2D &amp;p) { mrpt::math::containerFromPoseOrPoint(*this,p); } \</span>
<a name="l00119"></a>00119 <span class="preprocessor">                explicit inline _CLASS_( const mrpt::poses::CPoint3D &amp;p) { mrpt::math::containerFromPoseOrPoint(*this,p); }</span>
<a name="l00120"></a>00120 <span class="preprocessor"></span>
<a name="l00121"></a>00121 
<a name="l00122"></a>00122                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER1,<span class="keyword">class</span> CONTAINER2&gt; <span class="keywordtype">void</span> <a class="code" href="namespacemrpt_1_1math.html#ae8114c744c0608670c4df1fd59be8909" title="Computes the cumulative sum of all the elements, saving the result in another container.">cumsum</a>(<span class="keyword">const</span> CONTAINER1 &amp;in_data, CONTAINER2 &amp;out_cumsum);
<a name="l00123"></a>00123 
<a name="l00124"></a>00124                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> <span class="keyword">typename</span> CONTAINER<a class="code" href="eigen__plugins_8h.html#afd07186978da46f9908364e389f8a403" title="Type of the elements.">::value_type</a> <a class="code" href="namespacemrpt_1_1math.html#a5cb3c01d8c6c1577d5e93daba2cfe62a">norm</a>(<span class="keyword">const</span> CONTAINER &amp;v);
<a name="l00125"></a>00125                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> <span class="keyword">typename</span> CONTAINER<a class="code" href="eigen__plugins_8h.html#afd07186978da46f9908364e389f8a403" title="Type of the elements.">::value_type</a> <a class="code" href="namespacemrpt_1_1math.html#af104d8452be90bb99aa78ef15168c37a">norm_inf</a>(<span class="keyword">const</span> CONTAINER &amp;v);
<a name="l00126"></a>00126 
<a name="l00127"></a>00127                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> MAT_A,<span class="keyword">class</span> SKEW_3VECTOR,<span class="keyword">class</span> MAT_OUT&gt; <span class="keywordtype">void</span> <a class="code" href="namespacemrpt_1_1math.html#ad21f2859644b754aba9a1392503a9776" title="Only for vectors/arrays &quot;v&quot; of length3, compute out = A * Skew(v), where Skew(v) is the skew symmetri...">multiply_A_skew3</a>(<span class="keyword">const</span> MAT_A &amp;A,<span class="keyword">const</span> SKEW_3VECTOR &amp;v, MAT_OUT &amp;out);
<a name="l00128"></a>00128                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> SKEW_3VECTOR,<span class="keyword">class</span> MAT_A,<span class="keyword">class</span> MAT_OUT&gt; <span class="keywordtype">void</span> <a class="code" href="namespacemrpt_1_1math.html#a134f1d14fa12f25cbc82fa36faf59393" title="Only for vectors/arrays &quot;v&quot; of length3, compute out = Skew(v) * A, where Skew(v) is the skew symmetri...">multiply_skew3_A</a>(<span class="keyword">const</span> SKEW_3VECTOR &amp;v,<span class="keyword">const</span> MAT_A &amp;A, MAT_OUT &amp;out);
<a name="l00129"></a>00129 
<a name="l00130"></a>00130                 <span class="keyword">namespace </span>detail
<a name="l00131"></a>00131                 {
<a name="l00132"></a>00132                         <span class="comment">// Implemented in &quot;lightweight_geom_data.cpp&quot;</span>
<a name="l00133"></a>00133                         TPoint2D <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">lightFromPose</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_point2_d.html" title="A class used to store a 2D point.">mrpt::poses::CPoint2D</a> &amp;p);     <span class="comment">//!&lt; Convert a pose into a light-weight structure (functional form, needed for forward declarations)</span>
<a name="l00134"></a>00134 <span class="comment"></span>                        TPoint3D <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">lightFromPose</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_point3_d.html" title="A class used to store a 3D point.">mrpt::poses::CPoint3D</a> &amp;p);     <span class="comment">//!&lt; Convert a pose into a light-weight structure (functional form, needed for forward declarations)</span>
<a name="l00135"></a>00135 <span class="comment"></span>                        TPose2D  <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">lightFromPose</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">mrpt::poses::CPose2D</a> &amp;p);      <span class="comment">//!&lt; Convert a pose into a light-weight structure (functional form, needed for forward declarations)</span>
<a name="l00136"></a>00136 <span class="comment"></span>                        TPose3D  <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">lightFromPose</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d.html" title="A class used to store a 3D pose (a 3D translation + a rotation in 3D).">mrpt::poses::CPose3D</a> &amp;p);      <span class="comment">//!&lt; Convert a pose into a light-weight structure (functional form, needed for forward declarations)</span>
<a name="l00137"></a>00137 <span class="comment"></span>                        TPose3DQuat <a class="code" href="base_2include_2mrpt_2base_2link__pragmas_8h.html#a6045fa0129b1a3d6c8bf895470e66574">BASE_IMPEXP</a> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">lightFromPose</a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html" title="A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).">mrpt::poses::CPose3DQuat</a> &amp;p);       <span class="comment">//!&lt; Convert a pose into a light-weight structure (functional form, needed for forward declarations)</span>
<a name="l00138"></a>00138 <span class="comment"></span>
<a name="l00139"></a>00139                         <span class="keyword">template</span> &lt;<span class="keyword">class</span> MATORG, <span class="keyword">class</span> MATDEST&gt;
<a name="l00140"></a>00140                         <span class="keywordtype">void</span> <a class="code" href="namespacemrpt_1_1math_1_1detail.html#aa19b24dfb9f42a5339d2abf59dc97f27" title="Extract a submatrix - The output matrix must be set to the required size before call.">extractMatrix</a>(
<a name="l00141"></a>00141                                 <span class="keyword">const</span> MATORG &amp;M,
<a name="l00142"></a>00142                                 <span class="keyword">const</span> <span class="keywordtype">size_t</span> first_row,
<a name="l00143"></a>00143                                 <span class="keyword">const</span> <span class="keywordtype">size_t</span> first_col,
<a name="l00144"></a>00144                                 MATDEST &amp;outMat);
<a name="l00145"></a>00145                 }
<a name="l00146"></a>00146 <span class="comment"></span>
<a name="l00147"></a>00147 <span class="comment">                /** Conversion of poses to MRPT containers (vector/matrix) */</span>
<a name="l00148"></a>00148                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> TPoint2D &amp;p);
<a name="l00149"></a>00149                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> TPoint3D &amp;p);
<a name="l00150"></a>00150                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> TPose2D &amp;p);
<a name="l00151"></a>00151                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> TPose3D &amp;p);
<a name="l00152"></a>00152                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> TPose3DQuat &amp;p);
<a name="l00153"></a>00153 
<a name="l00154"></a><a class="code" href="namespacemrpt_1_1math.html#a18c53c49ad8ef398678deec9c914cde8">00154</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_point2_d.html" title="A class used to store a 2D point.">mrpt::poses::CPoint2D</a> &amp;p) { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(C, <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">mrpt::math::detail::lightFromPose</a>(p)); }
<a name="l00155"></a><a class="code" href="namespacemrpt_1_1math.html#a30ecb651b9da8b9118117b1a26f485dd">00155</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_point3_d.html" title="A class used to store a 3D point.">mrpt::poses::CPoint3D</a> &amp;p) { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(C, <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">mrpt::math::detail::lightFromPose</a>(p)); }
<a name="l00156"></a><a class="code" href="namespacemrpt_1_1math.html#adea561f2ee5a8a28351bbef5ffbb05b1">00156</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose2_d.html" title="A class used to store a 2D pose.">mrpt::poses::CPose2D</a> &amp;p)  { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(C, <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">mrpt::math::detail::lightFromPose</a>(p)); }
<a name="l00157"></a><a class="code" href="namespacemrpt_1_1math.html#a2a3b094fbf8cfb043aff2b506633de1d">00157</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d.html" title="A class used to store a 3D pose (a 3D translation + a rotation in 3D).">mrpt::poses::CPose3D</a> &amp;p)  { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(C, <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">mrpt::math::detail::lightFromPose</a>(p)); }
<a name="l00158"></a><a class="code" href="namespacemrpt_1_1math.html#a7e658c8b9d02c03ab373070d34fcb4c7">00158</a>                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> CONTAINER&gt; <span class="keyword">inline</span> CONTAINER &amp; <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(CONTAINER &amp;C, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1poses_1_1_c_pose3_d_quat.html" title="A class used to store a 3D pose as a translation (x,y,z) and a quaternion (qr,qx,qy,qz).">mrpt::poses::CPose3DQuat</a> &amp;p)  { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt_1_1math.html#aef8993918de72c2d8a80a6e26b68d5b0" title="Conversion of poses to MRPT containers (vector/matrix)">containerFromPoseOrPoint</a>(C, <a class="code" href="namespacemrpt_1_1math_1_1detail.html#a51a3e438efb331032d34d57b02f55d58" title="Convert a pose into a light-weight structure (functional form, needed for forward declarations)...">mrpt::math::detail::lightFromPose</a>(p)); }
<a name="l00159"></a>00159 
<a name="l00160"></a>00160 
<a name="l00161"></a>00161                 <span class="comment">// Vicinity classes ----------------------------------------------------</span>
<a name="l00162"></a>00162                 <span class="keyword">namespace </span>detail        {<span class="comment"></span>
<a name="l00163"></a>00163 <span class="comment">                        /**</span>
<a name="l00164"></a>00164 <span class="comment">                          * The purpose of this class is to model traits for containers, so that they can be used as return values for the function CMatrixTemplate::getVicinity.</span>
<a name="l00165"></a>00165 <span class="comment">                          * This class is NOT defined for any base container, because correctness would not be guaranteed. Instead, each class must define its own specialization</span>
<a name="l00166"></a>00166 <span class="comment">                          * of the template, containing two functions:</span>
<a name="l00167"></a>00167 <span class="comment">                          * - static void initialize(container&lt;T&gt;,size_t N): must reserve space to allow at least the insertion of N*N elements, in a square fashion when appliable.</span>
<a name="l00168"></a>00168 <span class="comment">                          * - static void insertInContainer(container&lt;T&gt;,size_t r,size_t c,const T &amp;): must insert the given element in the container. Whenever it&#39;s possible, it</span>
<a name="l00169"></a>00169 <span class="comment">                          * must insert it in the (r,c) coordinates.</span>
<a name="l00170"></a>00170 <span class="comment">                          * For linear containers, the vicinity functions are guaranteed to insert elements in order, i.e., starting from the top and reading from left to right.</span>
<a name="l00171"></a>00171 <span class="comment">                          */</span>
<a name="l00172"></a>00172                         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T&gt; <span class="keyword">class </span>VicinityTraits;
<a name="l00173"></a>00173 <span class="comment"></span>
<a name="l00174"></a>00174 <span class="comment">                        /**</span>
<a name="l00175"></a>00175 <span class="comment">                          * This huge template encapsulates a function to get the vicinity of an element, with maximum genericity. Although it&#39;s not meant to be called directly,</span>
<a name="l00176"></a>00176 <span class="comment">                          * every type defining the ASSERT_ENOUGHROOM assert and the get_unsafe method will work. The assert checks if the boundaries (r-N,r+N,c-N,c+N) fit in</span>
<a name="l00177"></a>00177 <span class="comment">                          * the matrix.</span>
<a name="l00178"></a>00178 <span class="comment">                          * The template parameters are the following:</span>
<a name="l00179"></a>00179 <span class="comment">                          * - MatrixType: the matrix or container base type, from which the vicinity is required.</span>
<a name="l00180"></a>00180 <span class="comment">                          * - T: the base type of the matrix or container.</span>
<a name="l00181"></a>00181 <span class="comment">                          * - ReturnType: the returning container type. The class VicinityTraits&lt;ReturnType&gt; must be completely defined.</span>
<a name="l00182"></a>00182 <span class="comment">                          * - D: the dimension of the vicinity. Current implementations are 4, 5, 8, 9, 12, 13, 20, 21, 24 and 25, although it&#39;s easy to implement new variants.</span>
<a name="l00183"></a>00183 <span class="comment">                          */</span>
<a name="l00184"></a>00184                         <span class="keyword">template</span>&lt;<span class="keyword">typename</span> MatrixType,<span class="keyword">typename</span> T,<span class="keyword">typename</span> ReturnType,<span class="keywordtype">size_t</span> D&gt; <span class="keyword">struct </span>getVicinity;
<a name="l00185"></a>00185 
<a name="l00186"></a>00186                 }
<a name="l00187"></a>00187 
<a name="l00188"></a>00188                 <span class="comment">// Other forward decls:</span>
<a name="l00189"></a>00189                 <span class="keyword">template</span> &lt;<span class="keyword">class</span> T&gt; T <a class="code" href="group__container__ops__grp.html#ga81ffbc190c3274c294a71aad568e98e3" title="Modifies the given angle to translate it into the [0,2pi[ range.">wrapTo2Pi</a>(T a);
<a name="l00190"></a>00190 
<a name="l00191"></a>00191 
<a name="l00192"></a>00192         } <span class="comment">// End of namespace</span>
<a name="l00193"></a>00193 } <span class="comment">// End of namespace</span>
<a name="l00194"></a>00194 
<a name="l00195"></a>00195 <span class="preprocessor">#endif</span>
</pre></div></div>
</div>
<br><hr><br> <table border="0" width="100%"> <tr> <td> Page generated by <a href="http://www.doxygen.org" target="_blank">Doxygen 1.7.5</a> for MRPT 0.9.5 SVN: at Sun Sep 25 17:20:18 UTC 2011</td><td></td> <td width="100"> </td> <td width="150">  </td></tr> </table>  </body></html>