/usr/share/doc/libeigen3-dev/html/TopicClassHierarchy.html is in libeigen3-doc 3.3.4-4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 | <!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.13"/>
<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="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
</script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
$(document).ready(function() { init_search(); });
</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>
 <span id="projectnumber">3.3.4</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.13 -->
<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)">
</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><<a class="el" href="classEigen_1_1Matrix.html" title="The matrix class, also used for vectors and row-vectors. ">Matrix</a>></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#a0cc046747cc9329cc02e208a122e002e">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#a9fd0703bd7bfe89d6dc80e2ce87c312a">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><Matrix>
<-- DenseCoeffsBase<Matrix> (direct access case)
<-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a><Matrix>
<-- <a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a><Matrix>
<-- <a class="el" href="classEigen_1_1PlainObjectBase.html" title="Dense storage base class for matrices and arrays. ">PlainObjectBase</a><Matrix> (matrix case)
<-- <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><Array>
<-- DenseCoeffsBase<Array> (direct access case)
<-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a><Array>
<-- <a class="el" href="classEigen_1_1ArrayBase.html" title="Base class for all 1D and 2D array, and related expressions. ">ArrayBase</a><Array>
<-- <a class="el" href="classEigen_1_1PlainObjectBase.html" title="Dense storage base class for matrices and arrays. ">PlainObjectBase</a><Array> (array case)
<-- <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><SomeMatrixXpr>
<-- DenseCoeffsBase<SomeMatrixXpr> (direct access or no direct access case)
<-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a><SomeMatrixXpr>
<-- <a class="el" href="classEigen_1_1MatrixBase.html" title="Base class for all dense matrices, vectors, and expressions. ">MatrixBase</a><SomeMatrixXpr>
<-- 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><SomeArrayXpr>
<-- DenseCoeffsBase<SomeArrayXpr> (direct access or no direct access case)
<-- <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a><SomeArrayXpr>
<-- <a class="el" href="classEigen_1_1ArrayBase.html" title="Base class for all 1D and 2D array, and related expressions. ">ArrayBase</a><SomeArrayXpr>
<-- 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><DiagonalMatrix>
<– DiagonalBase<DiagonalMatrix>
<– <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 by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.13 </li>
</ul>
</div>
</body>
</html>
|