Sophie

Sophie

distrib > Mageia > 4 > i586 > by-pkgid > 99cb5ede6a5329071fbeecc8218deb35 > files > 477

eigen3-doc-3.2-3.mga4.noarch.rpm

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.5"/>
<title>Eigen: Map&lt; PlainObjectType, MapOptions, StrideType &gt; Class Template Reference</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
  $(document).ready(initResizable);
  $(window).load(resizeHeight);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { searchBox.OnSelectItem(0); });
</script>
<link href="doxygen.css"   rel="stylesheet" type="text/css" />
<link href="eigendoxy.css" rel="stylesheet" type="text/css">
<!--  -->
<script type="text/javascript" src="eigen_navtree_hacks.js"></script>
<!-- <script type="text/javascript"> -->
<!-- </script> -->
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<!-- <a name="top"></a> -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectlogo"><img alt="Logo" src="Eigen_Silly_Professor_64x64.png"/></td>
  <td style="padding-left: 0.5em;">
   <div id="projectname"><a href="http://eigen.tuxfamily.org">Eigen</a>
   &#160;<span id="projectnumber">3.2.0</span>
   </div>
  </td>
   <td>        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
</td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.5 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
  <div id="nav-tree">
    <div id="nav-tree-contents">
      <div id="nav-sync" class="sync"></div>
    </div>
  </div>
  <div id="splitbar" style="-moz-user-select:none;" 
       class="ui-resizable-handle">
  </div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('classEigen_1_1Map.html','');});
</script>
<div id="doc-content">
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
<a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(0)"><span class="SelectionMark">&#160;</span>All</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(1)"><span class="SelectionMark">&#160;</span>Classes</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(2)"><span class="SelectionMark">&#160;</span>Namespaces</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(3)"><span class="SelectionMark">&#160;</span>Functions</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(4)"><span class="SelectionMark">&#160;</span>Variables</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(5)"><span class="SelectionMark">&#160;</span>Typedefs</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(6)"><span class="SelectionMark">&#160;</span>Enumerations</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(7)"><span class="SelectionMark">&#160;</span>Enumerator</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(8)"><span class="SelectionMark">&#160;</span>Friends</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(9)"><span class="SelectionMark">&#160;</span>Groups</a><a class="SelectItem" href="javascript:void(0)" onclick="searchBox.OnSelectItem(10)"><span class="SelectionMark">&#160;</span>Pages</a></div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div class="header">
  <div class="summary">
<a href="classEigen_1_1Map-members.html">List of all members</a> &#124;
<a href="#pub-methods">Public Member Functions</a>  </div>
  <div class="headertitle">
<div class="title">Map&lt; PlainObjectType, MapOptions, StrideType &gt; Class Template Reference<div class="ingroups"><a class="el" href="group__Core__Module.html">Core module</a></div></div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><h3>template&lt;typename PlainObjectType, int MapOptions, typename StrideType&gt;<br/>
class Eigen::Map&lt; PlainObjectType, MapOptions, StrideType &gt;</h3>

<p>A matrix or vector expression mapping an existing array of data. </p>
<dl class="tparams"><dt>Template Parameters</dt><dd>
  <table class="tparams">
    <tr><td class="paramname">PlainObjectType</td><td>the equivalent matrix type of the mapped data </td></tr>
    <tr><td class="paramname">MapOptions</td><td>specifies whether the pointer is <code><a class="el" href="group__enums.html#gga456ac33d49271d3e2c371351cd1d6371ad5380ca00f3d74b38593adf8a0d06d3e">Aligned</a></code>, or <code><a class="el" href="group__enums.html#gga456ac33d49271d3e2c371351cd1d6371afeaf599f3da3693d2ab4a7cc48a19437">Unaligned</a></code>. The default is <code><a class="el" href="group__enums.html#gga456ac33d49271d3e2c371351cd1d6371afeaf599f3da3693d2ab4a7cc48a19437">Unaligned</a></code>. </td></tr>
    <tr><td class="paramname">StrideType</td><td>optionally specifies strides. By default, <a class="el" href="classEigen_1_1Map.html" title="A matrix or vector expression mapping an existing array of data. ">Map</a> assumes the memory layout of an ordinary, contiguous array. This can be overridden by specifying strides. The type passed here must be a specialization of the <a class="el" href="classEigen_1_1Stride.html" title="Holds strides information for Map. ">Stride</a> template, see examples below.</td></tr>
  </table>
  </dd>
</dl>
<p>This class represents a matrix or vector expression mapping an existing array of data. It can be used to let <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> interface without any overhead with non-Eigen data structures, such as plain C arrays or structures from other libraries. By default, it assumes that the data is laid out contiguously in memory. You can however override this by explicitly specifying inner and outer strides.</p>
<p>Here's an example of simply mapping a contiguous array as a <a class="el" href="group__TopicStorageOrders.html">column-major</a> matrix: </p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> array[9];</div>
<div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 9; ++i) array[i] = i;</div>
<div class="line">cout &lt;&lt; Map&lt;Matrix3i&gt;(array) &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p>
<pre class="fragment">0 3 6
1 4 7
2 5 8
</pre><p>If you need to map non-contiguous arrays, you can do so by specifying strides:</p>
<p>Here's an example of mapping an array as a vector, specifying an inner stride, that is, the pointer increment between two consecutive coefficients. Here, we're specifying the inner stride as a compile-time fixed value. </p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> array[12];</div>
<div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 12; ++i) array[i] = i;</div>
<div class="line">cout &lt;&lt; Map&lt;VectorXi, 0, InnerStride&lt;2&gt; &gt;</div>
<div class="line">         (array, 6) <span class="comment">// the inner stride has already been passed as template parameter</span></div>
<div class="line">     &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p>
<pre class="fragment">0
2
4
6
8
10
</pre><p>Here's an example of mapping an array while specifying an outer stride. Here, since we're mapping as a column-major matrix, 'outer stride' means the pointer increment between two consecutive columns. Here, we're specifying the outer stride as a runtime parameter. Note that here <code>OuterStride&lt;&gt;</code> is a short version of <code>OuterStride&lt;Dynamic&gt;</code> because the default template parameter of <a class="el" href="classEigen_1_1OuterStride.html" title="Convenience specialization of Stride to specify only an outer stride See class Map for some examples...">OuterStride</a> is <code>Dynamic</code> </p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> array[12];</div>
<div class="line"><span class="keywordflow">for</span>(<span class="keywordtype">int</span> i = 0; i &lt; 12; ++i) array[i] = i;</div>
<div class="line">cout &lt;&lt; Map&lt;MatrixXi, 0, OuterStride&lt;&gt; &gt;(array, 3, 3, OuterStride&lt;&gt;(4)) &lt;&lt; endl;</div>
</div><!-- fragment --><p> Output: </p>
<pre class="fragment"> 0  4  8
 1  5  9
 2  6 10
</pre><p>For more details and for an example of specifying both an inner and an outer stride, see class <a class="el" href="classEigen_1_1Stride.html" title="Holds strides information for Map. ">Stride</a>.</p>
<p><b>Tip:</b> to change the array of data mapped by a <a class="el" href="classEigen_1_1Map.html" title="A matrix or vector expression mapping an existing array of data. ">Map</a> object, you can use the C++ placement new syntax:</p>
<p>Example: </p>
<div class="fragment"><div class="line"><span class="keywordtype">int</span> data[] = {1,2,3,4,5,6,7,8,9};</div>
<div class="line">Map&lt;RowVectorXi&gt; v(data,4);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;The mapped vector v is: &quot;</span> &lt;&lt; v &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
<div class="line"><span class="keyword">new</span> (&amp;v) Map&lt;RowVectorXi&gt;(data+4,5);</div>
<div class="line">cout &lt;&lt; <span class="stringliteral">&quot;Now v is: &quot;</span> &lt;&lt; v &lt;&lt; <span class="stringliteral">&quot;\n&quot;</span>;</div>
</div><!-- fragment --><p> Output: </p>
<pre class="fragment">The mapped vector v is: 1 2 3 4
Now v is: 5 6 7 8 9
</pre><p>This class is the return type of PlainObjectBase::Map() but can also be used directly.</p>
<dl class="section see"><dt>See Also</dt><dd>PlainObjectBase::Map(), <a class="el" href="group__TopicStorageOrders.html">Storage orders</a> </dd></dl>
</div><div id="dynsection-0" onclick="return toggleVisibility(this)" class="dynheader closed" style="cursor:pointer;">
  <img id="dynsection-0-trigger" src="closed.png" alt="+"/> Inheritance diagram for Map&lt; PlainObjectType, MapOptions, StrideType &gt;:</div>
<div id="dynsection-0-summary" class="dynsummary" style="display:block;">
</div>
<div id="dynsection-0-content" class="dyncontent" style="display:none;">
<div class="center"><img src="classEigen_1_1Map__inherit__graph.png" border="0" usemap="#Map_3_01PlainObjectType_00_01MapOptions_00_01StrideType_01_4_inherit__map" alt="Inheritance graph"/></div>
<map name="Map_3_01PlainObjectType_00_01MapOptions_00_01StrideType_01_4_inherit__map" id="Map_3_01PlainObjectType_00_01MapOptions_00_01StrideType_01_4_inherit__map">
<area shape="rect" id="node2" href="classEigen_1_1MapBase.html" title="{MapBase\&lt; Map\&lt; PlainObject\lType, MapOptions, StrideType \&gt; \&gt;\n||}" alt="" coords="4,6,227,98"/></map>
</div>
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="pub-methods"></a>
Public Member Functions</h2></td></tr>
<tr class="memitem:afe23c7bb3258c300073673e0cf7e4e8d"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Map.html#afe23c7bb3258c300073673e0cf7e4e8d">Map</a> (PointerArgType dataPtr, const StrideType &amp;a_stride=StrideType())</td></tr>
<tr class="separator:afe23c7bb3258c300073673e0cf7e4e8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a634c57f640ed589f49962cfbcc9389b2"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Map.html#a634c57f640ed589f49962cfbcc9389b2">Map</a> (PointerArgType dataPtr, Index a_size, const StrideType &amp;a_stride=StrideType())</td></tr>
<tr class="separator:a634c57f640ed589f49962cfbcc9389b2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a94b95b4da8298b640ea47129f6d5331e"><td class="memItemLeft" align="right" valign="top">&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="classEigen_1_1Map.html#a94b95b4da8298b640ea47129f6d5331e">Map</a> (PointerArgType dataPtr, Index nbRows, Index nbCols, const StrideType &amp;a_stride=StrideType())</td></tr>
<tr class="separator:a94b95b4da8298b640ea47129f6d5331e"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Constructor &amp; Destructor Documentation</h2>
<a class="anchor" id="afe23c7bb3258c300073673e0cf7e4e8d"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Map.html">Map</a> </td>
          <td>(</td>
          <td class="paramtype">PointerArgType&#160;</td>
          <td class="paramname"><em>dataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const StrideType &amp;&#160;</td>
          <td class="paramname"><em>a_stride</em> = <code>StrideType()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor in the fixed-size case.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataPtr</td><td>pointer to the array to map </td></tr>
    <tr><td class="paramname">a_stride</td><td>optional <a class="el" href="classEigen_1_1Stride.html" title="Holds strides information for Map. ">Stride</a> object, passing the strides. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a634c57f640ed589f49962cfbcc9389b2"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Map.html">Map</a> </td>
          <td>(</td>
          <td class="paramtype">PointerArgType&#160;</td>
          <td class="paramname"><em>dataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Index&#160;</td>
          <td class="paramname"><em>a_size</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const StrideType &amp;&#160;</td>
          <td class="paramname"><em>a_stride</em> = <code>StrideType()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor in the dynamic-size vector case.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataPtr</td><td>pointer to the array to map </td></tr>
    <tr><td class="paramname">a_size</td><td>the size of the vector expression </td></tr>
    <tr><td class="paramname">a_stride</td><td>optional <a class="el" href="classEigen_1_1Stride.html" title="Holds strides information for Map. ">Stride</a> object, passing the strides. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a94b95b4da8298b640ea47129f6d5331e"></a>
<div class="memitem">
<div class="memproto">
<table class="mlabels">
  <tr>
  <td class="mlabels-left">
      <table class="memname">
        <tr>
          <td class="memname"><a class="el" href="classEigen_1_1Map.html">Map</a> </td>
          <td>(</td>
          <td class="paramtype">PointerArgType&#160;</td>
          <td class="paramname"><em>dataPtr</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Index&#160;</td>
          <td class="paramname"><em>nbRows</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">Index&#160;</td>
          <td class="paramname"><em>nbCols</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const StrideType &amp;&#160;</td>
          <td class="paramname"><em>a_stride</em> = <code>StrideType()</code>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
  </td>
  <td class="mlabels-right">
<span class="mlabels"><span class="mlabel">inline</span></span>  </td>
  </tr>
</table>
</div><div class="memdoc">
<p>Constructor in the dynamic-size matrix case.</p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">dataPtr</td><td>pointer to the array to map </td></tr>
    <tr><td class="paramname">nbRows</td><td>the number of rows of the matrix expression </td></tr>
    <tr><td class="paramname">nbCols</td><td>the number of columns of the matrix expression </td></tr>
    <tr><td class="paramname">a_stride</td><td>optional <a class="el" href="classEigen_1_1Stride.html" title="Holds strides information for Map. ">Stride</a> object, passing the strides. </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<hr/>The documentation for this class was generated from the following file:<ul>
<li><a class="el" href="Map_8h_source.html">Map.h</a></li>
</ul>
</div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="navelem"><a class="el" href="namespaceEigen.html">Eigen</a></li><li class="navelem"><a class="el" href="classEigen_1_1Map.html">Map</a></li>
    <li class="footer">Generated on Mon Oct 28 2013 11:04:29 for Eigen by
    <a href="http://www.doxygen.org/index.html">
    <img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.5 </li>
  </ul>
</div>
<!-- Piwik --> 
<!--
<script type="text/javascript">
var pkBaseURL = (("https:" == document.location.protocol) ? "https://stats.sylphide-consulting.com/piwik/" : "http://stats.sylphide-consulting.com/piwik/");
document.write(unescape("%3Cscript src='" + pkBaseURL + "piwik.js' type='text/javascript'%3E%3C/script%3E"));
</script><script type="text/javascript">
try {
var piwikTracker = Piwik.getTracker(pkBaseURL + "piwik.php", 20);
piwikTracker.trackPageView();
piwikTracker.enableLinkTracking();
} catch( err ) {}
</script><noscript><p><img src="http://stats.sylphide-consulting.com/piwik/piwik.php?idsite=20" style="border:0" alt="" /></p></noscript>
-->
<!-- End Piwik Tracking Code -->
</body>
</html>