Sophie

Sophie

distrib > Mageia > 4 > x86_64 > by-pkgid > 99cb5ede6a5329071fbeecc8218deb35 > files > 216

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: The class hierarchy</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('TopicClassHierarchy.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="headertitle">
<div class="title">The class hierarchy </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This page explains the design of the core classes in <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a>'s class hierarchy and how they fit together. Casual users probably need not concern themselves with these details, but it may be useful for both advanced users and <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> developers.</p>
<h1><a class="anchor" id="TopicClassHierarchyPrinciples"></a>
Principles</h1>
<p><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a>'s class hierarchy is designed so that virtual functions are avoided where their overhead would significantly impair performance. Instead, <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> achieves polymorphism with the Curiously Recurring Template Pattern (CRTP). In this pattern, the base class (for instance, <code><a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a></code>) is in fact a template class, and the derived class (for instance, <code><a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a></code>) inherits the base class with the derived class itself as a template argument (in this case, <code><a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a></code> inherits from <code><a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a>&lt;<a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a>&gt;</code>). This allows <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> to resolve the polymorphic function calls at compile time.</p>
<p>In addition, the design avoids multiple inheritance. One reason for this is that in our experience, some compilers (like MSVC) fail to perform empty base class optimization, which is crucial for our fixed-size types.</p>
<h1><a class="anchor" id="TopicClassHierarchyCoreClasses"></a>
The core classes</h1>
<p>These are the classes that you need to know about if you want to write functions that accept or return <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> objects.</p>
<ul>
<li><a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a> means plain dense matrix. If <code>m</code> is a <code>Matrix</code>, then, for instance, <code>m+m</code> is no longer a <code>Matrix</code>, it is a "matrix expression".</li>
<li><a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a> means dense matrix expression. This means that a <code>MatrixBase</code> is something that can be added, matrix-multiplied, LU-decomposed, QR-decomposed... All matrix expression classes, including <code>Matrix</code> itself, inherit <code>MatrixBase</code>.</li>
<li><a class="el" href="classEigen_1_1Array.html" title="General-purpose arrays with easy API for coefficient-wise operations. ">Array</a> means plain dense array. If <code>x</code> is an <code>Array</code>, then, for instance, <code>x+x</code> is no longer an <code>Array</code>, it is an "array expression".</li>
<li><a class="el" href="classEigen_1_1ArrayBase.html" title="Base class for all 1D and 2D array, and related expressions. ">ArrayBase</a> means dense array expression. This means that an <code>ArrayBase</code> is something that can be added, array-multiplied, and on which you can perform all sorts of array operations... All array expression classes, including <code>Array</code> itself, inherit <code>ArrayBase</code>.</li>
<li><a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a> means dense (matrix or array) expression. Both <code>ArrayBase</code> and <code>MatrixBase</code> inherit <code>DenseBase</code>. <code>DenseBase</code> is where all the methods go that apply to dense expressions regardless of whether they are matrix or array expressions. For example, the <a class="el" href="classEigen_1_1DenseBase.html#a1dbaa2fc7b809720407130f48dfacf8f">block(...) </a> methods are in <code>DenseBase</code>.</li>
</ul>
<h1><a class="anchor" id="TopicClassHierarchyBaseClasses"></a>
Base classes</h1>
<p>These classes serve as base classes for the five core classes mentioned above. They are more internal and so less interesting for users of the <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> library.</p>
<ul>
<li><a class="el" href="classEigen_1_1PlainObjectBase.html" title="Dense storage base class for matrices and arrays. ">PlainObjectBase</a> means dense (matrix or array) plain object, i.e. something that stores its own dense array of coefficients. This is where, for instance, the <a class="el" href="classEigen_1_1PlainObjectBase.html#afbbb33d14fe7fb9683019a39ce1c659d">resize() </a> methods go. <code>PlainObjectBase</code> is inherited by <code>Matrix</code> and by <code>Array</code>. But above, we said that <code>Matrix</code> inherits <code>MatrixBase</code> and <code>Array</code> inherits <code>ArrayBase</code>. So does that mean multiple inheritance? No, because <code>PlainObjectBase</code> <em>itself</em> inherits <code>MatrixBase</code> or <code>ArrayBase</code> depending on whether we are in the matrix or array case. When we said above that <code>Matrix</code> inherited <code>MatrixBase</code>, we omitted to say it does so indirectly via <code>PlainObjectBase</code>. Same for <code>Array</code>.</li>
<li>DenseCoeffsBase means something that has dense coefficient accessors. It is a base class for <code>DenseBase</code>. The reason for <code>DenseCoeffsBase</code> to exist is that the set of available coefficient accessors is very different depending on whether a dense expression has direct memory access or not (the <code>DirectAccessBit</code> flag). For example, if <code>x</code> is a plain matrix, then <code>x</code> has direct access, and <code>x.transpose()</code> and <code>x.block</code>(...) also have direct access, because their coefficients can be read right off memory, but for example, <code>x+x</code> does not have direct memory access, because obtaining any of its coefficients requires a computation (an addition), it can't be just read off memory.</li>
<li><a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a> means anything that can be evaluated into a plain dense matrix or array (even if that would be a bad idea). <code>EigenBase</code> is really the absolute base class for anything that remotely looks like a matrix or array. It is a base class for <code>DenseCoeffsBase</code>, so it sits below all our dense class hierarchy, but it is not limited to dense expressions. For example, <code>EigenBase</code> is also inherited by diagonal matrices, sparse matrices, etc...</li>
</ul>
<h1><a class="anchor" id="TopicClassHierarchyInheritanceDiagrams"></a>
Inheritance diagrams</h1>
<p>The inheritance diagram for <a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a> looks as follows:</p>
<pre>
<a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt;Matrix&gt;
  &lt;-- DenseCoeffsBase&lt;Matrix&gt;    (direct access case)
    &lt;-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a>&lt;Matrix&gt;
      &lt;-- <a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a>&lt;Matrix&gt;
        &lt;-- <a class="el" href="classEigen_1_1PlainObjectBase.html" title="Dense storage base class for matrices and arrays. ">PlainObjectBase</a>&lt;Matrix&gt;    (matrix case)
          &lt;-- <a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a>
</pre><p>The inheritance diagram for <a class="el" href="classEigen_1_1Array.html" title="General-purpose arrays with easy API for coefficient-wise operations. ">Array</a> looks as follows:</p>
<pre>
<a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt;Array&gt;
  &lt;-- DenseCoeffsBase&lt;Array&gt;    (direct access case)
    &lt;-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a>&lt;Array&gt;
      &lt;-- <a class="el" href="classEigen_1_1ArrayBase.html" title="Base class for all 1D and 2D array, and related expressions. ">ArrayBase</a>&lt;Array&gt;
        &lt;-- <a class="el" href="classEigen_1_1PlainObjectBase.html" title="Dense storage base class for matrices and arrays. ">PlainObjectBase</a>&lt;Array&gt;    (array case)
          &lt;-- <a class="el" href="classEigen_1_1Array.html" title="General-purpose arrays with easy API for coefficient-wise operations. ">Array</a>
</pre><p>The inheritance diagram for some other matrix expression class, here denoted by <code>SomeMatrixXpr</code>, looks as follows:</p>
<pre>
<a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt;SomeMatrixXpr&gt;
  &lt;-- DenseCoeffsBase&lt;SomeMatrixXpr&gt;    (direct access or no direct access case)
    &lt;-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a>&lt;SomeMatrixXpr&gt;
      &lt;-- <a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a>&lt;SomeMatrixXpr&gt;
        &lt;-- SomeMatrixXpr
</pre><p>The inheritance diagram for some other array expression class, here denoted by <code>SomeArrayXpr</code>, looks as follows:</p>
<pre>
<a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt;SomeArrayXpr&gt;
  &lt;-- DenseCoeffsBase&lt;SomeArrayXpr&gt;    (direct access or no direct access case)
    &lt;-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a>&lt;SomeArrayXpr&gt;
      &lt;-- <a class="el" href="classEigen_1_1ArrayBase.html" title="Base class for all 1D and 2D array, and related expressions. ">ArrayBase</a>&lt;SomeArrayXpr&gt;
        &lt;-- SomeArrayXpr
</pre><p>Finally, consider an example of something that is not a dense expression, for instance a diagonal matrix. The corresponding inheritance diagram is:</p>
<pre>
<a class="el" href="structEigen_1_1EigenBase.html">EigenBase</a>&lt;DiagonalMatrix&gt;
  &lt;&ndash; DiagonalBase&lt;DiagonalMatrix&gt;
    &lt;&ndash; <a class="el" href="classEigen_1_1DiagonalMatrix.html" title="Represents a diagonal matrix with its storage. ">DiagonalMatrix</a>
</pre> </div></div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
  <ul>
    <li class="footer">Generated on Mon Oct 28 2013 11:04:26 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>