Sophie

Sophie

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

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>CArray.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">CArray.h</div>  </div>
</div>
<div class="contents">
<a href="_c_array_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_CArray_H</span>
<a name="l00029"></a>00029 <span class="preprocessor"></span><span class="preprocessor">#define _MRPT_CArray_H</span>
<a name="l00030"></a>00030 <span class="preprocessor"></span>
<a name="l00031"></a>00031 <span class="preprocessor">#include &lt;<a class="code" href="utils__defs_8h.html">mrpt/utils/utils_defs.h</a>&gt;</span>
<a name="l00032"></a>00032 <span class="preprocessor">#include &lt;<a class="code" href="math__frwds_8h.html">mrpt/math/math_frwds.h</a>&gt;</span>
<a name="l00033"></a>00033 <span class="preprocessor">#include &lt;<a class="code" href="ops__containers_8h.html" title="This file implements several operations that operate element-wise on individual or pairs of container...">mrpt/math/ops_containers.h</a>&gt;</span>
<a name="l00034"></a>00034 <span class="preprocessor">#include &lt;<a class="code" href="_c_serializable_8h.html">mrpt/utils/CSerializable.h</a>&gt;</span>  <span class="comment">// Used only for the extension to TTypeName</span>
<a name="l00035"></a>00035 
<a name="l00036"></a>00036 <span class="keyword">namespace </span>mrpt
<a name="l00037"></a>00037 {
<a name="l00038"></a><a class="code" href="namespacemrpt_1_1math.html">00038</a> <span class="keyword">namespace </span>math
<a name="l00039"></a>00039 {
<a name="l00040"></a>00040         <span class="comment">// ----------------  CArray -------------------------</span><span class="comment"></span>
<a name="l00041"></a>00041 <span class="comment">        /** A STL container (as wrapper) for arrays of constant size defined at compile time - &lt;b&gt;Users will most likely prefer to use CArrayPOD and its derived classes instead&lt;/b&gt;.</span>
<a name="l00042"></a>00042 <span class="comment">         *</span>
<a name="l00043"></a>00043 <span class="comment">         * This code is an adapted version from Boost, modifed for its integration</span>
<a name="l00044"></a>00044 <span class="comment">         *      within MRPT (JLBC, Dec/2009) (Renamed array -&gt; CArray to avoid possible potential conflicts).</span>
<a name="l00045"></a>00045 <span class="comment">         *</span>
<a name="l00046"></a>00046 <span class="comment">         * See</span>
<a name="l00047"></a>00047 <span class="comment">         *      http://www.josuttis.com/cppcode</span>
<a name="l00048"></a>00048 <span class="comment">         * for details and the latest version.</span>
<a name="l00049"></a>00049 <span class="comment">         * See</span>
<a name="l00050"></a>00050 <span class="comment">         *      http://www.boost.org/libs/array for Documentation.</span>
<a name="l00051"></a>00051 <span class="comment">         * for documentation.</span>
<a name="l00052"></a>00052 <span class="comment">         *</span>
<a name="l00053"></a>00053 <span class="comment">         * (C) Copyright Nicolai M. Josuttis 2001.</span>
<a name="l00054"></a>00054 <span class="comment">         * Permission to copy, use, modify, sell and distribute this software</span>
<a name="l00055"></a>00055 <span class="comment">         * is granted provided this copyright notice appears in all copies.</span>
<a name="l00056"></a>00056 <span class="comment">         * This software is provided &quot;as is&quot; without express or implied</span>
<a name="l00057"></a>00057 <span class="comment">         * warranty, and with no claim as to its suitability for any purpose.</span>
<a name="l00058"></a>00058 <span class="comment">         *</span>
<a name="l00059"></a>00059 <span class="comment">         * 29 Jan 2004 - minor fixes (Nico Josuttis)</span>
<a name="l00060"></a>00060 <span class="comment">         * 04 Dec 2003 - update to synch with library TR1 (Alisdair Meredith)</span>
<a name="l00061"></a>00061 <span class="comment">         * 23 Aug 2002 - fix for Non-MSVC compilers combined with MSVC libraries.</span>
<a name="l00062"></a>00062 <span class="comment">         * 05 Aug 2001 - minor update (Nico Josuttis)</span>
<a name="l00063"></a>00063 <span class="comment">         * 20 Jan 2001 - STLport fix (Beman Dawes)</span>
<a name="l00064"></a>00064 <span class="comment">         * 29 Sep 2000 - Initial Revision (Nico Josuttis)</span>
<a name="l00065"></a>00065 <span class="comment">         *</span>
<a name="l00066"></a>00066 <span class="comment">         * Jan 30, 2004</span>
<a name="l00067"></a>00067 <span class="comment">         *</span>
<a name="l00068"></a>00068 <span class="comment">         * \note This class DOES NOT support mathematical operations on its elements: it&#39;s a generic container, it doesn&#39;t assume they are numerical.</span>
<a name="l00069"></a>00069 <span class="comment">         * \note For a summary and classification of all MRPT vector, array and matrix classes see: http://www.mrpt.org/Matrices_vectors_arrays_and_Linear_Algebra_MRPT_and_Eigen_classes</span>
<a name="l00070"></a>00070 <span class="comment">         *</span>
<a name="l00071"></a>00071 <span class="comment">     * \sa CArrayNumeric (for another, non-related base template class that DOES support maths)</span>
<a name="l00072"></a>00072 <span class="comment">         * \ingroup mrpt_base_grp</span>
<a name="l00073"></a>00073 <span class="comment">         */</span>
<a name="l00074"></a>00074     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00075"></a>00075     <span class="keyword">class </span><a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray</a> {
<a name="l00076"></a>00076       <span class="keyword">public</span>:
<a name="l00077"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">00077</a>         T <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[N];    <span class="comment">// fixed-size array of elements of type T</span>
<a name="l00078"></a>00078 
<a name="l00079"></a>00079       <span class="keyword">public</span>:
<a name="l00080"></a>00080         <span class="comment">// type definitions</span>
<a name="l00081"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">00081</a>         <span class="keyword">typedef</span> T              <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">value_type</a>;
<a name="l00082"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">00082</a>         <span class="keyword">typedef</span> T*             <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>;
<a name="l00083"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">00083</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> T*       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">const_iterator</a>;
<a name="l00084"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">00084</a>         <span class="keyword">typedef</span> T&amp;             <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a>;
<a name="l00085"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">00085</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> T&amp;       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a>;
<a name="l00086"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">00086</a>         <span class="keyword">typedef</span> std::size_t    <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a>;
<a name="l00087"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">00087</a>         <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">difference_type</a>;
<a name="l00088"></a>00088 
<a name="l00089"></a>00089         <span class="comment">// iterator support</span>
<a name="l00090"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">00090</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>; }
<a name="l00091"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3b0cceec495b31a462f4fe9a6cc2b832">00091</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">const_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3b0cceec495b31a462f4fe9a6cc2b832">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>; }
<a name="l00092"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">00092</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>+N; }
<a name="l00093"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#af081cbc51fef302db5f2a9e7dddd24ae">00093</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">const_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#af081cbc51fef302db5f2a9e7dddd24ae">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>+N; }
<a name="l00094"></a>00094 
<a name="l00095"></a>00095         <span class="comment">// reverse iterator support</span>
<a name="l00096"></a>00096 <span class="preprocessor">#if !defined(BOOST_NO_TEMPLATE_PARTIAL_SPECIALIZATION) &amp;&amp; !defined(BOOST_MSVC_STD_ITERATOR) &amp;&amp; !defined(BOOST_NO_STD_ITERATOR_TRAITS)</span>
<a name="l00097"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">00097</a> <span class="preprocessor"></span>        <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator&lt;iterator&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>;
<a name="l00098"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">00098</a>         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator&lt;const_iterator&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>;
<a name="l00099"></a>00099 <span class="preprocessor">#elif defined(_MSC_VER) &amp;&amp; (_MSC_VER == 1300) &amp;&amp; defined(BOOST_DINKUMWARE_STDLIB) &amp;&amp; (BOOST_DINKUMWARE_STDLIB == 310)</span>
<a name="l00100"></a>00100 <span class="preprocessor"></span>        <span class="comment">// workaround for broken reverse_iterator in VC7</span>
<a name="l00101"></a>00101         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator</a>&lt;std::_Ptrit&lt;<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">value_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">difference_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>,
<a name="l00102"></a>00102                                       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a>&gt; &gt; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>;
<a name="l00103"></a>00103         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator</a>&lt;std::_Ptrit&lt;<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">value_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">difference_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">const_iterator</a>,
<a name="l00104"></a>00104                                       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a>&gt; &gt; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>;
<a name="l00105"></a>00105 <span class="preprocessor">#else</span>
<a name="l00106"></a>00106 <span class="preprocessor"></span>        <span class="comment">// workaround for broken reverse_iterator implementations</span>
<a name="l00107"></a>00107         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator&lt;iterator,T&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>;
<a name="l00108"></a>00108         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">::reverse_iterator&lt;const_iterator,T&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>;
<a name="l00109"></a>00109 <span class="preprocessor">#endif</span>
<a name="l00110"></a>00110 <span class="preprocessor"></span>
<a name="l00111"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a32b0753d3a6fde7942ff02e819e3c379">00111</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a32b0753d3a6fde7942ff02e819e3c379">rbegin</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>()); }
<a name="l00112"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab1857df1d4b402ad67a86d06b1b189be">00112</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab1857df1d4b402ad67a86d06b1b189be">rbegin</a>()<span class="keyword"> const </span>{
<a name="l00113"></a>00113             <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>());
<a name="l00114"></a>00114         }
<a name="l00115"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4418e2a373cd3008ca2ecdd123b07def">00115</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4418e2a373cd3008ca2ecdd123b07def">rend</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>()); }
<a name="l00116"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4a30d0ba7c2504b7c7bc309a0555f18e">00116</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4a30d0ba7c2504b7c7bc309a0555f18e">rend</a>()<span class="keyword"> const </span>{
<a name="l00117"></a>00117             <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>());
<a name="l00118"></a>00118         }
<a name="l00119"></a>00119 
<a name="l00120"></a>00120         <span class="comment">// operator[]</span>
<a name="l00121"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a62b9c36ff6692a2b77dbb496b2299aab">00121</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a62b9c36ff6692a2b77dbb496b2299aab">operator[]</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> i) { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]; }
<a name="l00122"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab5a91212ba5c44fc022b204125b3c35b">00122</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab5a91212ba5c44fc022b204125b3c35b">operator[]</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> i)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]; }
<a name="l00123"></a>00123 
<a name="l00124"></a>00124         <span class="comment">// at() with range check</span>
<a name="l00125"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ace4abdcd7e15b911a38ce6979eb9fc71">00125</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ace4abdcd7e15b911a38ce6979eb9fc71">at</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> i) { <a class="code" href="classmrpt_1_1math_1_1_c_array.html#add9e546797cb70d8ec1cc6d7f8bf8a7a">rangecheck</a>(i); <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]; }
<a name="l00126"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4e0afd1a61f618edd61b10343a829d10">00126</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a4e0afd1a61f618edd61b10343a829d10">at</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> i)<span class="keyword"> const </span>{ <a class="code" href="classmrpt_1_1math_1_1_c_array.html#add9e546797cb70d8ec1cc6d7f8bf8a7a">rangecheck</a>(i); <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]; }
<a name="l00127"></a>00127 
<a name="l00128"></a>00128         <span class="comment">// front() and back()</span>
<a name="l00129"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad3fbb11bf51ba87ae45085663d5471fe">00129</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad3fbb11bf51ba87ae45085663d5471fe">front</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[0]; }
<a name="l00130"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad4db6ff03b0b4cef5e25bbfb01d835e9">00130</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad4db6ff03b0b4cef5e25bbfb01d835e9">front</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[0]; }
<a name="l00131"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a88153b95d53c672a3eb6d52ca898c5bc">00131</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a88153b95d53c672a3eb6d52ca898c5bc">back</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[N-1]; }
<a name="l00132"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3d1713c6d4d3bf616f1dff1505a30cb1">00132</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3d1713c6d4d3bf616f1dff1505a30cb1">back</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[N-1]; }
<a name="l00133"></a>00133 
<a name="l00134"></a>00134         <span class="comment">// size is constant</span>
<a name="l00135"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a10ad921339d081b029c51afb14ea6277">00135</a>         <span class="keyword">static</span> <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a10ad921339d081b029c51afb14ea6277">size</a>() { <span class="keywordflow">return</span> N; }
<a name="l00136"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a5f4f830c4c22a8a9ae91e64d374bcf48">00136</a>         <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a5f4f830c4c22a8a9ae91e64d374bcf48">empty</a>() { <span class="keywordflow">return</span> <span class="keyword">false</span>; }
<a name="l00137"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a44c427f96cc8b9a5832a644a8bcfa321">00137</a>         <span class="keyword">static</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a44c427f96cc8b9a5832a644a8bcfa321">max_size</a>() { <span class="keywordflow">return</span> N; }
<a name="l00138"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad1a079db0db72c54da4974c095b19c99ad42eed6062a3f1d99eddb8e8f4daba54">00138</a>         <span class="keyword">enum</span> { <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad1a079db0db72c54da4974c095b19c99ad42eed6062a3f1d99eddb8e8f4daba54">static_size</a> = N };
<a name="l00139"></a>00139 <span class="comment"></span>
<a name="l00140"></a>00140 <span class="comment">                /** This method has no effects in this class, but raises an exception if the expected size does not match */</span>
<a name="l00141"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a5ae4a54abfebef0a522e2c0757c47d72">00141</a>                 <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a5ae4a54abfebef0a522e2c0757c47d72" title="This method has no effects in this class, but raises an exception if the expected size does not match...">resize</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> nElements) {
<a name="l00142"></a>00142                         <span class="keywordflow">if</span> (nElements!=N)
<a name="l00143"></a>00143                                 <span class="keywordflow">throw</span> <a class="code" href="classstd_1_1logic__error.html" title="STL class.">std::logic_error</a>(<a class="code" href="namespacemrpt.html#a3a27af794b658df5491e2b7678f8ccb8" title="A std::string version of C sprintf.">format</a>(<span class="stringliteral">&quot;Try to change the size of a %u-CArray to %u.&quot;</span>,static_cast&lt;unsigned&gt;(N),static_cast&lt;unsigned&gt;(nElements)));
<a name="l00144"></a>00144                 }
<a name="l00145"></a>00145 
<a name="l00146"></a>00146         <span class="comment">// swap (note: linear complexity in N, constant for given instantiation)</span>
<a name="l00147"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae29bdbb35cdb1a77b3f57f71f2ddfe45">00147</a>         <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae29bdbb35cdb1a77b3f57f71f2ddfe45">swap</a> (<a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00148"></a>00148             std::swap_ranges(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>(),<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>(),y.<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>());
<a name="l00149"></a>00149         }
<a name="l00150"></a>00150 
<a name="l00151"></a>00151         <span class="comment">// direct access to data (read-only)</span>
<a name="l00152"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a0ed90d4e44d7755b2e18b44f0df7f757">00152</a>         <span class="keyword">const</span> T* <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a0ed90d4e44d7755b2e18b44f0df7f757">data</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>; }
<a name="l00153"></a>00153 
<a name="l00154"></a>00154         <span class="comment">// use array as C array (direct read/write access to data)</span>
<a name="l00155"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#afa72d85db18b46d05ae3a3479a26bdb3">00155</a>         T* <a class="code" href="classmrpt_1_1math_1_1_c_array.html#afa72d85db18b46d05ae3a3479a26bdb3">data</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>; }
<a name="l00156"></a>00156 
<a name="l00157"></a>00157         <span class="comment">// assignment with type conversion</span>
<a name="l00158"></a>00158         <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T2&gt;
<a name="l00159"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3d57c813eab680c84681d5ab2df0d884">00159</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3d57c813eab680c84681d5ab2df0d884">operator= </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T2,N&gt;</a>&amp; rhs) {
<a name="l00160"></a>00160             std::copy(rhs.<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>(),rhs.<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>(), <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>());
<a name="l00161"></a>00161             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00162"></a>00162         }
<a name="l00163"></a>00163 
<a name="l00164"></a>00164         <span class="comment">// assign one value to all elements</span>
<a name="l00165"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab53aefe0081c3898021d56fe5c49267b">00165</a>         <span class="keyword">inline</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab53aefe0081c3898021d56fe5c49267b">assign</a> (<span class="keyword">const</span> T&amp; value)
<a name="l00166"></a>00166         {
<a name="l00167"></a>00167                         <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0;i&lt;N;i++) <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]=value;
<a name="l00168"></a>00168         }
<a name="l00169"></a>00169         <span class="comment">// assign (compatible with std::vector&#39;s one) (by JLBC for MRPT)</span>
<a name="l00170"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a9e928d345b77de8c54c337329892124c">00170</a>         <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab53aefe0081c3898021d56fe5c49267b">assign</a> (<span class="keyword">const</span> <span class="keywordtype">size_t</span> n, <span class="keyword">const</span> T&amp; value)
<a name="l00171"></a>00171         {
<a name="l00172"></a>00172                 <a class="code" href="mrpt__macros_8h.html#a5ad4d8d68e2f6664f247407bf89aac55" title="Defines an assertion mechanism - only when compiled in debug.">ASSERTDEB_</a>(N==n);
<a name="l00173"></a>00173                         <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0;i&lt;N;i++) <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab9cd6345b92bd98c52774b4c12d4c04d">elems</a>[i]=value;
<a name="l00174"></a>00174         }
<a name="l00175"></a>00175 
<a name="l00176"></a>00176                 <span class="comment">//assign a range of values corresponding to a pair of iterators (by PMO for MRPT)</span>
<a name="l00177"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#a92775dc66d9f278c62f1b848e43064d7">00177</a>                 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> I&gt; <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a92775dc66d9f278c62f1b848e43064d7">assign</a>(I b,<span class="keyword">const</span> I &amp;e)        {
<a name="l00178"></a>00178                         <a class="code" href="mrpt__macros_8h.html#a5ad4d8d68e2f6664f247407bf89aac55" title="Defines an assertion mechanism - only when compiled in debug.">ASSERTDEB_</a>(<a class="code" href="group__geometry__grp.html#ga8c0a76e906f12560cfa49fcd269c8398" title="Gets the distance between two points in a 2D space.">std::distance</a>(b,e)==N);
<a name="l00179"></a>00179                         <span class="keywordflow">for</span> (<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a> i=<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>();i&lt;<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>();++i) *i=*(b++);
<a name="l00180"></a>00180                 }
<a name="l00181"></a>00181 
<a name="l00182"></a>00182       <span class="keyword">private</span>:
<a name="l00183"></a>00183         <span class="comment">// check range (may be private because it is static)</span>
<a name="l00184"></a><a class="code" href="classmrpt_1_1math_1_1_c_array.html#add9e546797cb70d8ec1cc6d7f8bf8a7a">00184</a>         <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#add9e546797cb70d8ec1cc6d7f8bf8a7a">rangecheck</a> (<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae599b83fba8c369546f21f05f07d4d27">size_type</a> i) {
<a name="l00185"></a>00185             <span class="keywordflow">if</span> (i &gt;= <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a10ad921339d081b029c51afb14ea6277">size</a>()) {
<a name="l00186"></a>00186                 <span class="keywordflow">throw</span> <a class="code" href="classstd_1_1out__of__range.html" title="STL class.">std::out_of_range</a>(<span class="stringliteral">&quot;CArray&lt;&gt;: index out of range&quot;</span>);
<a name="l00187"></a>00187             }
<a name="l00188"></a>00188         }
<a name="l00189"></a>00189 
<a name="l00190"></a>00190     };
<a name="l00191"></a>00191 
<a name="l00192"></a>00192 <span class="comment">// partial specialization for arrays of size 0</span>
<a name="l00193"></a>00193     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T&gt;
<a name="l00194"></a>00194     <span class="keyword">class </span>CArray&lt;T,0&gt; {
<a name="l00195"></a>00195       <span class="keyword">public</span>:
<a name="l00196"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a37c105cce74dcc10072883939448705a">00196</a>         <span class="keywordtype">char</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a37c105cce74dcc10072883939448705a">c</a>;  <span class="comment">// to ensure different array intances return unique values for begin/end</span>
<a name="l00197"></a>00197 
<a name="l00198"></a>00198       <span class="keyword">public</span>:
<a name="l00199"></a>00199         <span class="comment">// type definitions</span>
<a name="l00200"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a707fb03f3ebdaa434c08eaa18bc76cc0">00200</a>         <span class="keyword">typedef</span> T              <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a707fb03f3ebdaa434c08eaa18bc76cc0">value_type</a>;
<a name="l00201"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">00201</a>         <span class="keyword">typedef</span> T*             <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">iterator</a>;
<a name="l00202"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">00202</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> T*       <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">const_iterator</a>;
<a name="l00203"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">00203</a>         <span class="keyword">typedef</span> T&amp;             <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a>;
<a name="l00204"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">00204</a>         <span class="keyword">typedef</span> <span class="keyword">const</span> T&amp;       <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">const_reference</a>;
<a name="l00205"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">00205</a>         <span class="keyword">typedef</span> std::size_t    <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a>;
<a name="l00206"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9f358f9bd04b3cdcc25bbcc0849c7339">00206</a>         <span class="keyword">typedef</span> std::ptrdiff_t <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9f358f9bd04b3cdcc25bbcc0849c7339">difference_type</a>;
<a name="l00207"></a>00207 
<a name="l00208"></a>00208         <span class="comment">// iterator support</span>
<a name="l00209"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ab698817aae3f3b2d07275f71a22041f6">00209</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ab698817aae3f3b2d07275f71a22041f6">begin</a>() { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">iterator</a> <span class="keyword">&gt;</span>( &amp;c ); }
<a name="l00210"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a42d27a04e84a72cb25706f2a02469b85">00210</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">const_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a42d27a04e84a72cb25706f2a02469b85">begin</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">const_iterator</a> <span class="keyword">&gt;</span>( &amp;c ); }
<a name="l00211"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ac6b07e490bc0d2e90af61583d1010538">00211</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ac6b07e490bc0d2e90af61583d1010538">end</a>() { <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a9e0bcae082a39d4fb21d9509ee6bab16">iterator</a> <span class="keyword">&gt;</span>( &amp;c ); }
<a name="l00212"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ac8189b8650bf1c2931641518b7d20ba1">00212</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">const_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ac8189b8650bf1c2931641518b7d20ba1">end</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">reinterpret_cast&lt;</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acd5c05dd14475a8dfbc9fb96cd9b8c03">const_iterator</a> <span class="keyword">&gt;</span>( &amp;c ); }
<a name="l00213"></a>00213 
<a name="l00214"></a>00214         <span class="comment">// reverse iterator support</span>
<a name="l00215"></a>00215 <span class="preprocessor">#if !defined(BOOST_MSVC_STD_ITERATOR) &amp;&amp; !defined(BOOST_NO_STD_ITERATOR_TRAITS)</span>
<a name="l00216"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">00216</a> <span class="preprocessor"></span>        <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator&lt;iterator&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">reverse_iterator</a>;
<a name="l00217"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a80c696b3793c761d984990759ab59ac0">00217</a>         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator&lt;const_iterator&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a80c696b3793c761d984990759ab59ac0">const_reverse_iterator</a>;
<a name="l00218"></a>00218 <span class="preprocessor">#elif defined(_MSC_VER) &amp;&amp; (_MSC_VER == 1300) &amp;&amp; defined(BOOST_DINKUMWARE_STDLIB) &amp;&amp; (BOOST_DINKUMWARE_STDLIB == 310)</span>
<a name="l00219"></a>00219 <span class="preprocessor"></span>        <span class="comment">// workaround for broken reverse_iterator in VC7</span>
<a name="l00220"></a>00220         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator</a>&lt;std::_Ptrit&lt;<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">value_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">difference_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>,
<a name="l00221"></a>00221                                       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a849999cedb850a679134cc82e35ea294">reference</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a>&gt; &gt; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>;
<a name="l00222"></a>00222         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator</a>&lt;std::_Ptrit&lt;<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ab496b499821c7c735edaa24ec1c3ba97">value_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aff5214f008eebc22e261f9fb6fa268ae">difference_type</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a8ab11f3541a3e651f1d0b3eb628efd61">const_iterator</a>,
<a name="l00223"></a>00223                                       <a class="code" href="classmrpt_1_1math_1_1_c_array.html#aabc20343c25cdfec9c5843ab9b2133a9">const_reference</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ae73ad3d3f2c4fad7bdef35cd8b0d9c2a">iterator</a>, <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a>&gt; &gt; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>;
<a name="l00224"></a>00224 <span class="preprocessor">#else</span>
<a name="l00225"></a>00225 <span class="preprocessor"></span>        <span class="comment">// workaround for broken reverse_iterator implementations</span>
<a name="l00226"></a>00226         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator&lt;iterator,T&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>;
<a name="l00227"></a>00227         <span class="keyword">typedef</span> std<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">::reverse_iterator&lt;const_iterator,T&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>;
<a name="l00228"></a>00228 <span class="preprocessor">#endif</span>
<a name="l00229"></a>00229 <span class="preprocessor"></span>
<a name="l00230"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a436bc68a21881058adaa9c29487700da">00230</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a436bc68a21881058adaa9c29487700da">rbegin</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>()); }
<a name="l00231"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#add23baf646e026cef15536478111255f">00231</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a80c696b3793c761d984990759ab59ac0">const_reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#add23baf646e026cef15536478111255f">rbegin</a>()<span class="keyword"> const </span>{
<a name="l00232"></a>00232             <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#a7e11daf7a9fa99cb3ae8497698b5be82">end</a>());
<a name="l00233"></a>00233         }
<a name="l00234"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa08b3c54e2a88aa70c2eff12e20f036a">00234</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aecb0be6c62428add4da4fb80be7d51d0">reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa08b3c54e2a88aa70c2eff12e20f036a">rend</a>() { <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ac317b7cdae9d42897d49b5d7eaced9e9">reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>()); }
<a name="l00235"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ab6d2276327837ab5d33365939c617884">00235</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a80c696b3793c761d984990759ab59ac0">const_reverse_iterator</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#ab6d2276327837ab5d33365939c617884">rend</a>()<span class="keyword"> const </span>{
<a name="l00236"></a>00236             <span class="keywordflow">return</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a6ac5ce7121946251161ffd79736c618f">const_reverse_iterator</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad0caf91d0032c2a7f0b28740ad472f93">begin</a>());
<a name="l00237"></a>00237         }
<a name="l00238"></a>00238 
<a name="l00239"></a>00239         <span class="comment">// at() with range check</span>
<a name="l00240"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a2b67cafb922ed47dc797c02f04cdc05f">00240</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a2b67cafb922ed47dc797c02f04cdc05f">at</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> i) {
<a name="l00241"></a>00241             <span class="keywordflow">throw</span> <a class="code" href="classstd_1_1out__of__range.html" title="STL class.">std::out_of_range</a>(<span class="stringliteral">&quot;CArray&lt;0&gt;: index out of range&quot;</span>);
<a name="l00242"></a>00242         }
<a name="l00243"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a05b0c08d2f3d58becac47f41c2e24974">00243</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a05b0c08d2f3d58becac47f41c2e24974">at</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> i)<span class="keyword"> const </span>{
<a name="l00244"></a>00244             <span class="keywordflow">throw</span> <a class="code" href="classstd_1_1out__of__range.html" title="STL class.">std::out_of_range</a>(<span class="stringliteral">&quot;&lt;0&gt;: index out of range&quot;</span>);
<a name="l00245"></a>00245         }
<a name="l00246"></a>00246 
<a name="l00247"></a>00247         <span class="comment">// size is constant</span>
<a name="l00248"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aaedbb829a22ca4373a6b14532872429f">00248</a>         <span class="keyword">static</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aaedbb829a22ca4373a6b14532872429f">size</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00249"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a7fc460e25deddc806acb1cff59e21c8f">00249</a>         <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a7fc460e25deddc806acb1cff59e21c8f">empty</a>() { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
<a name="l00250"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a219e786e59a11f6d906443fb86a7d8f8">00250</a>         <span class="keyword">static</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a219e786e59a11f6d906443fb86a7d8f8">max_size</a>() { <span class="keywordflow">return</span> 0; }
<a name="l00251"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#af7658f95fe98fc1e1fa4ae8bce804cdca649e8f98ee71bf14401b30fc176d2799">00251</a>         <span class="keyword">enum</span> { <a class="code" href="classmrpt_1_1math_1_1_c_array.html#ad1a079db0db72c54da4974c095b19c99ad42eed6062a3f1d99eddb8e8f4daba54">static_size</a> = 0 };
<a name="l00252"></a>00252 
<a name="l00253"></a>00253         <span class="comment">// swap</span>
<a name="l00254"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#afe786e9bc52e0972f85d0f7dc49fbdd6">00254</a>         <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#afe786e9bc52e0972f85d0f7dc49fbdd6">swap</a> (<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html">CArray&lt;T,0&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00255"></a>00255             <span class="comment">//  could swap value of c, but value is not part of documented array state</span>
<a name="l00256"></a>00256         }
<a name="l00257"></a>00257 
<a name="l00258"></a>00258         <span class="comment">// direct access to data</span>
<a name="l00259"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a01fb10dbd6fc419316430a3cb72f21f4">00259</a>         <span class="keyword">const</span> T* <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a01fb10dbd6fc419316430a3cb72f21f4">data</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> NULL; }
<a name="l00260"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a395ce5cbd48409a3f7d078a4580819c6">00260</a>         T* <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a395ce5cbd48409a3f7d078a4580819c6">data</a>() { <span class="keywordflow">return</span> NULL; }
<a name="l00261"></a>00261 
<a name="l00262"></a>00262         <span class="comment">// assignment with type conversion</span>
<a name="l00263"></a>00263         <span class="keyword">template</span> &lt; <span class="keyword">typename</span> T2 &gt;
<a name="l00264"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a29759054b1959c6bbedc866dd3784edd">00264</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html">CArray&lt; T,0 &gt;</a>&amp; <a class="code" href="classmrpt_1_1math_1_1_c_array.html#a3d57c813eab680c84681d5ab2df0d884">operator= </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt; T2, 0&gt;</a>&amp; rhs) {
<a name="l00265"></a>00265             <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00266"></a>00266         }
<a name="l00267"></a>00267 
<a name="l00268"></a>00268         <span class="comment">//  Calling these operations are undefined behaviour for 0-size arrays,</span>
<a name="l00269"></a>00269         <span class="comment">//  but Library TR1 requires their presence.</span>
<a name="l00270"></a>00270         <span class="comment">// operator[]</span>
<a name="l00271"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a49fb48001e06b51a9ead862f4c97f343">00271</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a49fb48001e06b51a9ead862f4c97f343">operator[]</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> i) { makes_no_sense(); <span class="keyword">static</span> T dumm=0; <span class="keywordflow">return</span> dumm; }
<a name="l00272"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acb36abfa717705ac765dae4701613c60">00272</a>         <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#acb36abfa717705ac765dae4701613c60">operator[]</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#aa9c749a73e292f329cee89e951d24bc9">size_type</a> i)<span class="keyword"> const </span>{ makes_no_sense(); <span class="keyword">static</span> T dumm=0; <span class="keywordflow">return</span> dumm; }
<a name="l00273"></a>00273 
<a name="l00274"></a>00274         <span class="comment">// front() and back()</span>
<a name="l00275"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a177bc36001c076e8190085535ea603e8">00275</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a177bc36001c076e8190085535ea603e8">front</a>() { makes_no_sense(); }
<a name="l00276"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a25fd477c5e64aa2aac04286366fef8b8">00276</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a25fd477c5e64aa2aac04286366fef8b8">front</a>()<span class="keyword"> const </span>{ makes_no_sense(); }
<a name="l00277"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a1a2ba231fa6175fc1cacba075b14781d">00277</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a48d512167d16642cb42315f047e43994">reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a1a2ba231fa6175fc1cacba075b14781d">back</a>() { makes_no_sense(); }
<a name="l00278"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#abd61249bf37f97a9a6d7803c0b7e92f9">00278</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a4d64d8d7a9b5392edaaac4141a52f320">const_reference</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#abd61249bf37f97a9a6d7803c0b7e92f9">back</a>()<span class="keyword"> const </span>{ makes_no_sense(); }
<a name="l00279"></a>00279 
<a name="l00280"></a>00280       <span class="keyword">private</span>:
<a name="l00281"></a>00281         <span class="comment">// helper for operations that have undefined behaviour for 0-size arrays,</span>
<a name="l00282"></a>00282         <span class="comment">//  assert( false ); added to make lack of support clear</span>
<a name="l00283"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a749ccc7e4c8fd1dbb37bbb68fc856a98">00283</a>         <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_3_01_t_00_010_01_4.html#a749ccc7e4c8fd1dbb37bbb68fc856a98">makes_no_sense</a> () {
<a name="l00284"></a>00284             <span class="comment">//assert(true);</span>
<a name="l00285"></a>00285             <span class="keywordflow">throw</span> <a class="code" href="classstd_1_1out__of__range.html" title="STL class.">std::out_of_range</a>(<span class="stringliteral">&quot;CArray&lt;0&gt;: index out of range&quot;</span>);
<a name="l00286"></a>00286         }
<a name="l00287"></a>00287     };
<a name="l00288"></a>00288 
<a name="l00289"></a>00289     <span class="comment">// comparisons</span>
<a name="l00290"></a>00290     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00291"></a><a class="code" href="namespacemrpt_1_1math.html#ad4a5f953c6f98c279c7d3ff13bbb223a">00291</a>     <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#ad4a5f953c6f98c279c7d3ff13bbb223a">operator== </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00292"></a>00292         <span class="keywordflow">return</span> std::equal(x.begin(), x.end(), y.begin());
<a name="l00293"></a>00293     }
<a name="l00294"></a>00294     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00295"></a><a class="code" href="namespacemrpt_1_1math.html#a8ad7d758a7e626faf788eeef3ff417cd">00295</a>     <span class="keywordtype">bool</span> operator&lt; (const CArray&lt;T,N&gt;&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00296"></a>00296         <span class="keywordflow">return</span> std::lexicographical_compare(x.begin(),x.end(),<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>.begin(),<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>.end());
<a name="l00297"></a>00297     }
<a name="l00298"></a>00298     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00299"></a><a class="code" href="namespacemrpt_1_1math.html#a9530d437eede574017f58f04ad36bcf9">00299</a>     <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#a9530d437eede574017f58f04ad36bcf9">operator!= </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00300"></a>00300         <span class="keywordflow">return</span> !(x==<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>);
<a name="l00301"></a>00301     }
<a name="l00302"></a>00302     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00303"></a><a class="code" href="namespacemrpt_1_1math.html#a98d3ccede4741958b8b770ec3a42ba6a">00303</a>     <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#a98d3ccede4741958b8b770ec3a42ba6a">operator&gt; </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00304"></a>00304         <span class="keywordflow">return</span> y&lt;x;
<a name="l00305"></a>00305     }
<a name="l00306"></a>00306     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00307"></a><a class="code" href="namespacemrpt_1_1math.html#a347edf1e28125aa17557cba00e993f31">00307</a>     <span class="keywordtype">bool</span> operator&lt;= (const CArray&lt;T,N&gt;&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00308"></a>00308         <span class="keywordflow">return</span> !(<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>&lt;x);
<a name="l00309"></a>00309     }
<a name="l00310"></a>00310     <span class="keyword">template</span>&lt;<span class="keyword">class</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00311"></a><a class="code" href="namespacemrpt_1_1math.html#aaa87caf92eb1bf78497cc0fe10b42f7f">00311</a>     <span class="keywordtype">bool</span> <a class="code" href="namespacemrpt_1_1math.html#aaa87caf92eb1bf78497cc0fe10b42f7f">operator&gt;= </a>(<span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; x, <span class="keyword">const</span> <a class="code" href="classmrpt_1_1math_1_1_c_array.html" title="A STL container (as wrapper) for arrays of constant size defined at compile time - Users will most li...">CArray&lt;T,N&gt;</a>&amp; <a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>) {
<a name="l00312"></a>00312         <span class="keywordflow">return</span> !(x&lt;<a class="code" href="namespace_eigen_1_1internal.html#a3d7a581aeb951248dc6fe114e9e05f07">y</a>);
<a name="l00313"></a>00313     }
<a name="l00314"></a>00314 
<a name="l00315"></a>00315 
<a name="l00316"></a>00316 
<a name="l00317"></a>00317 
<a name="l00318"></a>00318         <span class="comment">// ----------------  CArrayNumeric -------------------------</span>
<a name="l00319"></a>00319 <span class="comment"></span>
<a name="l00320"></a>00320 <span class="comment">    /** CArrayNumeric is an array for numeric types supporting several mathematical operations (actually, just a wrapper on Eigen::Matrix&lt;T,N,1&gt;)</span>
<a name="l00321"></a>00321 <span class="comment">      * \sa CArrayFloat, CArrayDouble, CArray</span>
<a name="l00322"></a>00322 <span class="comment">      */</span>
<a name="l00323"></a>00323     <span class="keyword">template</span> &lt;<span class="keyword">typename</span> T, std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00324"></a>00324     <span class="keyword">class </span>CArrayNumeric : <span class="keyword">public</span> Eigen::Matrix&lt;T,N,1&gt;
<a name="l00325"></a>00325     {
<a name="l00326"></a>00326         <span class="keyword">public</span>:
<a name="l00327"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#adba71632a06604a7ddb31653c1e92f21">00327</a>                 <span class="keyword">typedef</span> Eigen::Matrix&lt;T,N,1&gt; <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#adba71632a06604a7ddb31653c1e92f21" title="Base class typedef.">Base</a>;
<a name="l00328"></a>00328 
<a name="l00329"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#ab2a9dac3553719edabb57e8654dc015e">00329</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#ab2a9dac3553719edabb57e8654dc015e" title="Default constructor.">CArrayNumeric</a>() {}  <span class="comment">//!&lt; Default constructor</span>
<a name="l00330"></a>00330 <span class="comment"></span><span class="comment">        /** Constructor from initial values ptr[0]-ptr[N-1] */</span>
<a name="l00331"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#ac560194e5552e27ff921677f4d2f0e08">00331</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#ac560194e5552e27ff921677f4d2f0e08" title="Constructor from initial values ptr[0]-ptr[N-1].">CArrayNumeric</a>(<span class="keyword">const</span> T*ptr) : Eigen::<a class="code" href="class_eigen_1_1_matrix.html#a450c6afe1569c3815269ecd3c7931701" title="Default constructor.">Matrix</a>&lt;T,N,1&gt;(ptr) {}
<a name="l00332"></a>00332 
<a name="l00333"></a>00333                 <a class="code" href="math__frwds_8h.html#a62ee3e474e8ff7287af332daa529f7f8">MRPT_MATRIX_CONSTRUCTORS_FROM_POSES</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>)
<a name="l00334"></a>00334 
<a name="l00335"></a>00335                 <span class="comment">/** Initialization from a vector-like source, that is, anything implementing operator[]. */</span>
<a name="l00336"></a>00336         template &lt;class ARRAYLIKE&gt;
<a name="l00337"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#a3f0bcca56a522e77d05367df17d6f418">00337</a>         explicit <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>(const ARRAYLIKE &amp;obj) : Eigen::<a class="code" href="class_eigen_1_1_matrix.html#a450c6afe1569c3815269ecd3c7931701" title="Default constructor.">Matrix</a>&lt;T,N,1&gt;(obj) {}
<a name="l00338"></a>00338 
<a name="l00339"></a>00339                 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> OtherDerived&gt;
<a name="l00340"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#a2c102c378ead6d9b09e12b087ab272aa">00340</a>                 <span class="keyword">inline</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric&lt;T,N&gt;</a> &amp; <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html#a2c102c378ead6d9b09e12b087ab272aa">operator= </a>(<span class="keyword">const</span> <a class="code" href="class_eigen_1_1_matrix_base.html" title="Base class for all dense matrices, vectors, and expressions.">Eigen::MatrixBase &lt;OtherDerived&gt;</a>&amp; other) {
<a name="l00341"></a>00341                         <a class="code" href="class_eigen_1_1_matrix.html#af9c71dd0f9635e9982e24b554143a1e8" title="Assigns matrices to each other.">Base::operator=</a>(other);
<a name="l00342"></a>00342                         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
<a name="l00343"></a>00343                 }
<a name="l00344"></a>00344 
<a name="l00345"></a>00345     };
<a name="l00346"></a>00346 
<a name="l00347"></a>00347         <span class="comment">// --------------  Partial specializations of CArrayNumeric -----------</span>
<a name="l00348"></a>00348 <span class="comment"></span>
<a name="l00349"></a>00349 <span class="comment">    /** A partial specialization of CArrayNumeric for float numbers.</span>
<a name="l00350"></a>00350 <span class="comment">      * \sa CArrayNumeric, CArray */</span>
<a name="l00351"></a>00351     <span class="keyword">template</span> &lt;std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00352"></a>00352     <span class="keyword">class </span>CArrayFloat : <span class="keyword">public</span> CArrayNumeric&lt;float,N&gt;
<a name="l00353"></a>00353     {
<a name="l00354"></a>00354         <span class="keyword">public</span>:
<a name="l00355"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#aa267c21d5354d2977893b3373d94deb6">00355</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric&lt;float,N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#aa267c21d5354d2977893b3373d94deb6">Base</a>;
<a name="l00356"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#a6f49e1ef62717a562a2d4d22c387c4a9">00356</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html" title="A partial specialization of CArrayNumeric for float numbers.">CArrayFloat&lt;N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#a6f49e1ef62717a562a2d4d22c387c4a9">mrpt_autotype</a>;
<a name="l00357"></a>00357 
<a name="l00358"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#ab3c4466875a875336747cc841dd0f0ab">00358</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#ab3c4466875a875336747cc841dd0f0ab" title="Default constructor.">CArrayFloat</a>() {}  <span class="comment">//!&lt; Default constructor</span>
<a name="l00359"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#a84aabb1105c49dfa9709b0de8ee402b8">00359</a> <span class="comment"></span>        <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#a84aabb1105c49dfa9709b0de8ee402b8" title="Constructor from initial values ptr[0]-ptr[N-1].">CArrayFloat</a>(<span class="keyword">const</span> <span class="keywordtype">float</span>*ptr) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;float,N&gt;(ptr) {} <span class="comment">//!&lt; Constructor from initial values ptr[0]-ptr[N-1]</span>
<a name="l00360"></a>00360 <span class="comment"></span>
<a name="l00361"></a>00361                 <a class="code" href="math__frwds_8h.html#a62ee3e474e8ff7287af332daa529f7f8">MRPT_MATRIX_CONSTRUCTORS_FROM_POSES</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_float.html" title="A partial specialization of CArrayNumeric for float numbers.">CArrayFloat</a>)
<a name="l00362"></a>00362 
<a name="l00363"></a>00363                 <span class="comment">/** Initialization from a vector-like source, that is, anything implementing operator[]. */</span>
<a name="l00364"></a>00364         template &lt;class ARRAYLIKE&gt;
<a name="l00365"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_float.html#a1f5b48abd5eda80c4880b61d588ac437">00365</a>         explicit <a class="code" href="classmrpt_1_1math_1_1_c_array_float.html" title="A partial specialization of CArrayNumeric for float numbers.">CArrayFloat</a>(const ARRAYLIKE &amp;obj) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;<span class="keywordtype">float</span>,N&gt;(obj) {}
<a name="l00366"></a>00366                 <a class="code" href="base_2include_2mrpt_2utils_2types_8h.html#a5423f1c8bf92c8c2bb6592ee8ac333ef">MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_float.html" title="A partial specialization of CArrayNumeric for float numbers.">CArrayFloat</a>) <span class="comment">// Implements ctor and &quot;operator =&quot; for any other Eigen class</span>
<a name="l00367"></a>00367     };
<a name="l00368"></a>00368 <span class="comment"></span>
<a name="l00369"></a>00369 <span class="comment">    /** A partial specialization of CArrayNumeric for double numbers.</span>
<a name="l00370"></a>00370 <span class="comment">      * \sa CArrayNumeric, CArray */</span>
<a name="l00371"></a>00371     <span class="keyword">template</span> &lt;std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00372"></a>00372     <span class="keyword">class </span>CArrayDouble : <span class="keyword">public</span> CArrayNumeric&lt;double,N&gt;
<a name="l00373"></a>00373     {
<a name="l00374"></a>00374         <span class="keyword">public</span>:
<a name="l00375"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a5e27fec4a8f0a18d36c7120edfb8d09f">00375</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric&lt;double,N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a5e27fec4a8f0a18d36c7120edfb8d09f">Base</a>;
<a name="l00376"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a59b3d3ea036fc7edd4fe9e0a0055c5f2">00376</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html" title="A partial specialization of CArrayNumeric for double numbers.">CArrayDouble&lt;N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a59b3d3ea036fc7edd4fe9e0a0055c5f2">mrpt_autotype</a>;
<a name="l00377"></a>00377 
<a name="l00378"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a7857a441080ab9fe148709c3f944675c">00378</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a7857a441080ab9fe148709c3f944675c" title="Default constructor.">CArrayDouble</a>() {}  <span class="comment">//!&lt; Default constructor</span>
<a name="l00379"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a156dd3bc4c65e0233eb7b517b0c6ad7a">00379</a> <span class="comment"></span>        <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#a156dd3bc4c65e0233eb7b517b0c6ad7a" title="Constructor from initial values ptr[0]-ptr[N-1].">CArrayDouble</a>(<span class="keyword">const</span> <span class="keywordtype">double</span>*ptr) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;double,N&gt;(ptr) {} <span class="comment">//!&lt; Constructor from initial values ptr[0]-ptr[N-1]</span>
<a name="l00380"></a>00380 <span class="comment"></span>
<a name="l00381"></a>00381                 <a class="code" href="math__frwds_8h.html#a62ee3e474e8ff7287af332daa529f7f8">MRPT_MATRIX_CONSTRUCTORS_FROM_POSES</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_double.html" title="A partial specialization of CArrayNumeric for double numbers.">CArrayDouble</a>)
<a name="l00382"></a>00382 
<a name="l00383"></a>00383                 <span class="comment">/** Initialization from a vector-like source, that is, anything implementing operator[]. */</span>
<a name="l00384"></a>00384         template &lt;class ARRAYLIKE&gt;
<a name="l00385"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_double.html#ac88d51a3038b0aa4c23b99f929e8658a">00385</a>         explicit <a class="code" href="classmrpt_1_1math_1_1_c_array_double.html" title="A partial specialization of CArrayNumeric for double numbers.">CArrayDouble</a>(const ARRAYLIKE &amp;obj) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;<span class="keywordtype">double</span>,N&gt;(obj) {}
<a name="l00386"></a>00386                 <a class="code" href="base_2include_2mrpt_2utils_2types_8h.html#a5423f1c8bf92c8c2bb6592ee8ac333ef">MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_double.html" title="A partial specialization of CArrayNumeric for double numbers.">CArrayDouble</a>) <span class="comment">// Implements ctor and &quot;operator =&quot; for any other Eigen class</span>
<a name="l00387"></a>00387     };
<a name="l00388"></a>00388 <span class="comment"></span>
<a name="l00389"></a>00389 <span class="comment">    /** A partial specialization of CArrayNumeric for int numbers.</span>
<a name="l00390"></a>00390 <span class="comment">      * \sa CArrayNumeric, CArray */</span>
<a name="l00391"></a>00391     <span class="keyword">template</span> &lt;std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00392"></a>00392     <span class="keyword">class </span>CArrayInt : <span class="keyword">public</span> CArrayNumeric&lt;int,N&gt;
<a name="l00393"></a>00393     {
<a name="l00394"></a>00394         <span class="keyword">public</span>:
<a name="l00395"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a9000dc8a451b2be284d779e4c51f0204">00395</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric&lt;int,N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a9000dc8a451b2be284d779e4c51f0204">Base</a>;
<a name="l00396"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a779a6a65e595d763b62caa63f3ebaca8">00396</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_int.html" title="A partial specialization of CArrayNumeric for int numbers.">CArrayInt&lt;N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a779a6a65e595d763b62caa63f3ebaca8">mrpt_autotype</a>;
<a name="l00397"></a>00397 
<a name="l00398"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a2bca11549c1dae7ed5a7ffac59c6269f">00398</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a2bca11549c1dae7ed5a7ffac59c6269f" title="Default constructor.">CArrayInt</a>() {}  <span class="comment">//!&lt; Default constructor</span>
<a name="l00399"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a8854f3c4c9d2066e122b050a7e137eaf">00399</a> <span class="comment"></span>        <a class="code" href="classmrpt_1_1math_1_1_c_array_int.html#a8854f3c4c9d2066e122b050a7e137eaf" title="Constructor from initial values ptr[0]-ptr[N-1].">CArrayInt</a>(<span class="keyword">const</span> <span class="keywordtype">int</span>*ptr) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;int,N&gt;(ptr) {} <span class="comment">//!&lt; Constructor from initial values ptr[0]-ptr[N-1]</span>
<a name="l00400"></a>00400 <span class="comment"></span>                <a class="code" href="base_2include_2mrpt_2utils_2types_8h.html#a5423f1c8bf92c8c2bb6592ee8ac333ef">MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_int.html" title="A partial specialization of CArrayNumeric for int numbers.">CArrayInt</a>) <span class="comment">// Implements ctor and &quot;operator =&quot; for any other Eigen class</span>
<a name="l00401"></a>00401     };
<a name="l00402"></a>00402 <span class="comment"></span>
<a name="l00403"></a>00403 <span class="comment">    /** A partial specialization of CArrayNumeric for unsigned int numbers.</span>
<a name="l00404"></a>00404 <span class="comment">      * \sa CArrayNumeric, CArray */</span>
<a name="l00405"></a>00405     <span class="keyword">template</span> &lt;std::<span class="keywordtype">size_t</span> N&gt;
<a name="l00406"></a>00406     <span class="keyword">class </span>CArrayUInt : <span class="keyword">public</span> CArrayNumeric&lt;unsigned int,N&gt;
<a name="l00407"></a>00407     {
<a name="l00408"></a>00408         <span class="keyword">public</span>:
<a name="l00409"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#ac284803554556d496c561edc19fcc048">00409</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html">CArrayNumeric&lt;unsigned int,N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#ac284803554556d496c561edc19fcc048">Base</a>;
<a name="l00410"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#addb0b07aa46bd261be8d81c3e16a549d">00410</a>                 <span class="keyword">typedef</span> <a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html" title="A partial specialization of CArrayNumeric for unsigned int numbers.">CArrayUInt&lt;N&gt;</a> <a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#addb0b07aa46bd261be8d81c3e16a549d">mrpt_autotype</a>;
<a name="l00411"></a>00411 
<a name="l00412"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#a223146fccce27ddc8b7a5c699b7a61c5">00412</a>         <a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#a223146fccce27ddc8b7a5c699b7a61c5" title="Default constructor.">CArrayUInt</a>() {}  <span class="comment">//!&lt; Default constructor</span>
<a name="l00413"></a><a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#a3495ddc09269a21dfa3d9003d00c21c7">00413</a> <span class="comment"></span>        <a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html#a3495ddc09269a21dfa3d9003d00c21c7" title="Constructor from initial values ptr[0]-ptr[N-1].">CArrayUInt</a>(<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>*ptr) : <a class="code" href="classmrpt_1_1math_1_1_c_array_numeric.html" title="CArrayNumeric is an array for numeric types supporting several mathematical operations (actually...">CArrayNumeric</a>&lt;unsigned int,N&gt;(ptr) {} <span class="comment">//!&lt; Constructor from initial values ptr[0]-ptr[N-1]</span>
<a name="l00414"></a>00414 <span class="comment"></span>                <a class="code" href="base_2include_2mrpt_2utils_2types_8h.html#a5423f1c8bf92c8c2bb6592ee8ac333ef">MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL</a>(<a class="code" href="classmrpt_1_1math_1_1_c_array_u_int.html" title="A partial specialization of CArrayNumeric for unsigned int numbers.">CArrayUInt</a>) <span class="comment">// Implements ctor and &quot;operator =&quot; for any other Eigen class</span>
<a name="l00415"></a>00415     };
<a name="l00416"></a>00416 <span class="comment"></span>
<a name="l00417"></a>00417 <span class="comment">        /** Auxiliary class used in CMatrixTemplate:size(), CMatrixTemplate::resize(), CMatrixFixedNumeric::size(), CMatrixFixedNumeric::resize(), to mimic the behavior of STL-containers */</span>
<a name="l00418"></a>00418         <span class="keyword">struct </span>CMatrixTemplateSize : <span class="keyword">public</span> Eigen::Matrix&lt;size_t,2,1&gt;
<a name="l00419"></a>00419         {
<a name="l00420"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a22781d28bbbd9603309db2aa56a1c50c">00420</a>                 <span class="keyword">typedef</span> Eigen::Matrix&lt;size_t,2,1&gt; <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a22781d28bbbd9603309db2aa56a1c50c" title="Base class typedef.">Base</a>;
<a name="l00421"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a39a3f83f061ccdfbce76730e1115d596">00421</a>                 <span class="keyword">typedef</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html" title="Auxiliary class used in CMatrixTemplate:size(), CMatrixTemplate::resize(), CMatrixFixedNumeric::size(...">CMatrixTemplateSize</a> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a39a3f83f061ccdfbce76730e1115d596">mrpt_autotype</a>;
<a name="l00422"></a>00422 
<a name="l00423"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#abd34ed98818bd9c62c6d3b8b4b2e372c">00423</a>                 <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#abd34ed98818bd9c62c6d3b8b4b2e372c">CMatrixTemplateSize</a>() : Eigen::<a class="code" href="class_eigen_1_1_matrix.html#a450c6afe1569c3815269ecd3c7931701" title="Default constructor.">Matrix</a>&lt;size_t,2,1&gt;() {}
<a name="l00424"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a05c05d5ad9bd535cfe17f0686cf90a8c">00424</a>                 <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a05c05d5ad9bd535cfe17f0686cf90a8c">CMatrixTemplateSize</a>(<span class="keyword">const</span> <span class="keywordtype">size_t</span> *d) : Eigen::<a class="code" href="class_eigen_1_1_matrix.html#a450c6afe1569c3815269ecd3c7931701" title="Default constructor.">Matrix</a>&lt;size_t,2,1&gt;(d) {}
<a name="l00425"></a>00425 
<a name="l00426"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a449da8263ec4cfa03622b0c201b6e5f3">00426</a>                 <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#a449da8263ec4cfa03622b0c201b6e5f3">operator==</a>(<span class="keyword">const</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html" title="Auxiliary class used in CMatrixTemplate:size(), CMatrixTemplate::resize(), CMatrixFixedNumeric::size(...">CMatrixTemplateSize</a>&amp;o)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_eigen_1_1_matrix.html" title="The matrix class, also used for vectors and row-vectors.">Eigen::Matrix&lt;size_t,2,1&gt;::operator()</a>(0)==o[0] &amp;&amp; <a class="code" href="class_eigen_1_1_matrix.html" title="The matrix class, also used for vectors and row-vectors.">Eigen::Matrix&lt;size_t,2,1&gt;::operator()</a>(1)==o[1]; }
<a name="l00427"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#aeaaec5f9091ccea55fadc956d191de2a">00427</a>                 <span class="keyword">inline</span> <span class="keywordtype">bool</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#aeaaec5f9091ccea55fadc956d191de2a">operator!=</a>(<span class="keyword">const</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html" title="Auxiliary class used in CMatrixTemplate:size(), CMatrixTemplate::resize(), CMatrixFixedNumeric::size(...">CMatrixTemplateSize</a>&amp;o)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> !(*<span class="keyword">this</span>==o); }<span class="comment"></span>
<a name="l00428"></a>00428 <span class="comment">                /** This operator allows the size(N,M) to be compared with a plain size_t N*M  */</span>
<a name="l00429"></a><a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#ad3fb9c92d76c8d181a6ca6baddfb3efb">00429</a>                 <span class="keyword">inline</span> <a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html#ad3fb9c92d76c8d181a6ca6baddfb3efb" title="This operator allows the size(N,M) to be compared with a plain size_t N*M.">operator size_t</a>(<span class="keywordtype">void</span>)<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <a class="code" href="class_eigen_1_1_matrix.html" title="The matrix class, also used for vectors and row-vectors.">Eigen::Matrix&lt;size_t,2,1&gt;::operator()</a>(0)*<a class="code" href="class_eigen_1_1_matrix.html" title="The matrix class, also used for vectors and row-vectors.">Eigen::Matrix&lt;size_t,2,1&gt;::operator()</a>(1); }
<a name="l00430"></a>00430                 <a class="code" href="base_2include_2mrpt_2utils_2types_8h.html#a5423f1c8bf92c8c2bb6592ee8ac333ef">MRPT_EIGEN_DERIVED_CLASS_CTOR_OPERATOR_EQUAL</a>(<a class="code" href="structmrpt_1_1math_1_1_c_matrix_template_size.html" title="Auxiliary class used in CMatrixTemplate:size(), CMatrixTemplate::resize(), CMatrixFixedNumeric::size(...">CMatrixTemplateSize</a>) <span class="comment">// Implements ctor and &quot;operator =&quot; for any other Eigen class</span>
<a name="l00431"></a>00431         };
<a name="l00432"></a>00432 
<a name="l00433"></a>00433 } <span class="comment">// End of namespace</span>
<a name="l00434"></a>00434 
<a name="l00435"></a>00435         <span class="keyword">namespace </span>utils
<a name="l00436"></a>00436         {
<a name="l00437"></a>00437                 <span class="comment">// Extensions to mrpt::utils::TTypeName for matrices:</span>
<a name="l00438"></a>00438                 <span class="keyword">template</span>&lt;<span class="keyword">typename</span> T,<span class="keywordtype">size_t</span> N&gt; <span class="keyword">struct </span>TTypeName &lt;mrpt::math::CArrayNumeric&lt;T,N&gt; &gt; {
<a name="l00439"></a><a class="code" href="structmrpt_1_1utils_1_1_t_type_name_3_01mrpt_1_1math_1_1_c_array_numeric_3_01_t_00_01_n_01_4_01_4.html#a0394d81e7ea9703ee638fb4c42699924">00439</a>                         <span class="keyword">static</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> <span class="keyword">get</span>() { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt.html#a3a27af794b658df5491e2b7678f8ccb8" title="A std::string version of C sprintf.">mrpt::format</a>(<span class="stringliteral">&quot;CArrayNumeric&lt;%s,%u&gt;&quot;</span>,<a class="code" href="structmrpt_1_1utils_1_1_t_type_name.html" title="A template to obtain the type of its argument as a string at compile time.">TTypeName&lt;T&gt;::get</a>().c_str(),static_cast&lt;unsigned int&gt;(N)); } };
<a name="l00440"></a>00440                 <span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> N&gt; <span class="keyword">struct </span>TTypeName &lt;mrpt::math::CArrayDouble&lt;N&gt; &gt; {
<a name="l00441"></a><a class="code" href="structmrpt_1_1utils_1_1_t_type_name_3_01mrpt_1_1math_1_1_c_array_double_3_01_n_01_4_01_4.html#ab21a8cb12c9eb4fb31b24b10b255f0b7">00441</a>                         <span class="keyword">static</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> <span class="keyword">get</span>() { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt.html#a3a27af794b658df5491e2b7678f8ccb8" title="A std::string version of C sprintf.">mrpt::format</a>(<span class="stringliteral">&quot;CArrayNumeric&lt;double,%u&gt;&quot;</span>,static_cast&lt;unsigned int&gt;(N)); } };
<a name="l00442"></a>00442                 <span class="keyword">template</span>&lt;<span class="keywordtype">size_t</span> N&gt; <span class="keyword">struct </span>TTypeName &lt;mrpt::math::CArrayFloat&lt;N&gt; &gt; {
<a name="l00443"></a><a class="code" href="structmrpt_1_1utils_1_1_t_type_name_3_01mrpt_1_1math_1_1_c_array_float_3_01_n_01_4_01_4.html#adcbc8d8e0d5c811c31dfb8d10145a697">00443</a>                         <span class="keyword">static</span> std<a class="code" href="classstd_1_1string.html" title="STL class.">::string</a> <span class="keyword">get</span>() { <span class="keywordflow">return</span> <a class="code" href="namespacemrpt.html#a3a27af794b658df5491e2b7678f8ccb8" title="A std::string version of C sprintf.">mrpt::format</a>(<span class="stringliteral">&quot;CArrayNumeric&lt;float,%u&gt;&quot;</span>,static_cast&lt;unsigned int&gt;(N)); } };
<a name="l00444"></a>00444         }
<a name="l00445"></a>00445 
<a name="l00446"></a>00446 
<a name="l00447"></a>00447 } <span class="comment">// End of namespace</span>
<a name="l00448"></a>00448 
<a name="l00449"></a>00449 
<a name="l00450"></a>00450 <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>