This file is indexed.

/usr/share/doc/libeigen3-dev/html/Eigen2ToEigen3.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
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
<!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: Porting from Eigen2 to Eigen3</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>
   &#160;<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('Eigen2ToEigen3.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">Porting from Eigen2 to Eigen3 </div>  </div>
</div><!--header-->
<div class="contents">
<div class="textblock"><p>This page lists the most important API changes between Eigen2 and Eigen3, and gives tips to help porting your application from Eigen2 to Eigen3.</p>
<h1><a class="anchor" id="CompatibilitySupport"></a>
Eigen2 compatibility support</h1>
<p>Up to version 3.2 Eigen provides <a href="http://eigen.tuxfamily.org/dox-3.2/Eigen2SupportModes.html">Eigen2 support modes</a>. These are removed now, because they were barely used anymore and became hard to maintain after internal re-designs. You can still use them by first <a href="http://eigen.tuxfamily.org/dox-3.2/Eigen2ToEigen3.html">porting your code to Eigen 3.2</a>.</p>
<h1><a class="anchor" id="Using"></a>
The USING_PART_OF_NAMESPACE_EIGEN macro</h1>
<p>The USING_PART_OF_NAMESPACE_EIGEN macro has been removed. In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, just do: </p><div class="fragment"><div class="line"><span class="keyword">using namespace </span><a class="code" href="namespaceEigen.html">Eigen</a>;</div></div><!-- fragment --><h1><a class="anchor" id="ComplexDot"></a>
Dot products over complex numbers</h1>
<p>This is the single trickiest change between <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2 and <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3. It only affects code using <code>std::complex</code> numbers as scalar type.</p>
<p><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2's dot product was linear in the first variable. <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3's dot product is linear in the second variable. In other words, the <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2 code</p><div class="fragment"><div class="line">x.dot(y) </div></div><!-- fragment --><p> is equivalent to the <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 code</p><div class="fragment"><div class="line">y.dot(x) </div></div><!-- fragment --><p> In yet other words, dot products are complex-conjugated in <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 compared to <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2. The switch to the new convention was commanded by common usage, especially with the notation <img class="formulaInl" alt="$ x^Ty $" src="form_179.png"/> for dot products of column-vectors.</p>
<h1><a class="anchor" id="VectorBlocks"></a>
Vector blocks</h1>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th></tr>
<tr>
<td><div class="fragment"><div class="line">vector.start(length)</div><div class="line">vector.start&lt;length&gt;()</div><div class="line">vector.end(length)</div><div class="line">vector.end&lt;length&gt;()</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">vector.head(length)</div><div class="line">vector.head&lt;length&gt;()</div><div class="line">vector.tail(length)</div><div class="line">vector.tail&lt;length&gt;()</div></div><!-- fragment --> </td></tr>
</table>
<h1><a class="anchor" id="Corners"></a>
Matrix Corners</h1>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th></tr>
<tr>
<td><div class="fragment"><div class="line">matrix.corner(TopLeft,r,c)</div><div class="line">matrix.corner(TopRight,r,c)</div><div class="line">matrix.corner(BottomLeft,r,c)</div><div class="line">matrix.corner(BottomRight,r,c)</div><div class="line">matrix.corner&lt;r,c&gt;(TopLeft)</div><div class="line">matrix.corner&lt;r,c&gt;(TopRight)</div><div class="line">matrix.corner&lt;r,c&gt;(BottomLeft)</div><div class="line">matrix.corner&lt;r,c&gt;(BottomRight)</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">matrix.topLeftCorner(r,c)</div><div class="line">matrix.topRightCorner(r,c)</div><div class="line">matrix.bottomLeftCorner(r,c)</div><div class="line">matrix.bottomRightCorner(r,c)</div><div class="line">matrix.topLeftCorner&lt;r,c&gt;()</div><div class="line">matrix.topRightCorner&lt;r,c&gt;()</div><div class="line">matrix.bottomLeftCorner&lt;r,c&gt;()</div><div class="line">matrix.bottomRightCorner&lt;r,c&gt;()</div></div><!-- fragment -->  </td></tr>
</table>
<p>Notice that Eigen3 also provides these new convenience methods: topRows(), bottomRows(), leftCols(), rightCols(). See in class <a class="el" href="classEigen_1_1DenseBase.html" title="Base class for all dense matrices, vectors, and arrays. ">DenseBase</a>.</p>
<h1><a class="anchor" id="CoefficientWiseOperations"></a>
Coefficient wise operations</h1>
<p>In Eigen2, coefficient wise operations which have no proper mathematical definition (as a coefficient wise product) were achieved using the .cwise() prefix, e.g.: </p><div class="fragment"><div class="line">a.cwise() * b </div></div><!-- fragment --><p> In Eigen3 this .cwise() prefix has been superseded by a new kind of matrix type called <a class="el" href="classEigen_1_1Array.html" title="General-purpose arrays with easy API for coefficient-wise operations. ">Array</a> for which all operations are performed coefficient wise. You can easily view a matrix as an array and vice versa using the <a class="el" href="classEigen_1_1MatrixBase.html#a354c33eec32ceb4193d002f4d41c0497">MatrixBase::array()</a> and <a class="el" href="classEigen_1_1ArrayBase.html#af01e9ea8087e390af8af453bbe4c276c">ArrayBase::matrix()</a> functions respectively. Here is an example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#gae6a8e578d2848cc75f573c15a73bd9b4">Vector4f</a> a, b, c;</div><div class="line">c = a.array() * b.array();</div></div><!-- fragment --><p> Note that the .array() function is not at all a synonym of the deprecated .cwise() prefix. While the .cwise() prefix changed the behavior of the following operator, the array() function performs a permanent conversion to the array world. Therefore, for binary operations such as the coefficient wise product, both sides must be converted to an <em>array</em> as in the above example. On the other hand, when you concatenate multiple coefficient wise operations you only have to do the conversion once, e.g.: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#gae6a8e578d2848cc75f573c15a73bd9b4">Vector4f</a> a, b, c;</div><div class="line">c = a.array().abs().pow(3) * b.array().abs().sin();</div></div><!-- fragment --><p> With Eigen2 you would have written: </p><div class="fragment"><div class="line">c = (a.cwise().abs().cwise().pow(3)).cwise() * (b.cwise().abs().cwise().sin());</div></div><!-- fragment --><h1><a class="anchor" id="PartAndExtract"></a>
Triangular and self-adjoint matrices</h1>
<p>In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2 you had to play with the part, extract, and marked functions to deal with triangular and selfadjoint matrices. In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, all these functions have been removed in favor of the concept of <em>views:</em> </p>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th></tr>
<tr>
<td><div class="fragment"><div class="line">A.part&lt;UpperTriangular&gt;();</div><div class="line">A.part&lt;StrictlyLowerTriangular&gt;(); </div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;()</div><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81">StrictlyLower</a>&gt;()</div></div><!-- fragment --> </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.extract&lt;UpperTriangular&gt;();</div><div class="line">A.extract&lt;StrictlyLowerTriangular&gt;();</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;()</div><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81">StrictlyLower</a>&gt;()</div></div><!-- fragment --> </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.marked&lt;UpperTriangular&gt;();</div><div class="line">A.marked&lt;StrictlyLowerTriangular&gt;();</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;()</div><div class="line">A.triangularView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81">StrictlyLower</a>&gt;()</div></div><!-- fragment --> </td></tr>
<tr>
<td colspan="2"></td></tr>
<tr>
<td><div class="fragment"><div class="line">A.part&lt;SelfAdfjoint|UpperTriangular&gt;();</div><div class="line">A.extract&lt;SelfAdfjoint|LowerTriangular&gt;();</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;()</div><div class="line">A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;()</div></div><!-- fragment --> </td></tr>
<tr>
<td colspan="2"></td></tr>
<tr>
<td><div class="fragment"><div class="line">UpperTriangular</div><div class="line">LowerTriangular</div><div class="line">UnitUpperTriangular</div><div class="line">UnitLowerTriangular</div><div class="line">StrictlyUpperTriangular</div><div class="line">StrictlyLowerTriangular</div></div><!-- fragment --></td><td><div class="fragment"><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a></div><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a></div><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdadd28224d7ea92689930be73c1b50b0ad">UnitUpper</a></div><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda8f40b928c10a71ba03e5f75ad2a72fda">UnitLower</a></div><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda7b37877e0b9b0df28c9c2b669a633265">StrictlyUpper</a></div><div class="line"><a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cda2424988b6fca98be70b595632753ba81">StrictlyLower</a></div></div><!-- fragment -->  </td></tr>
</table>
<dl class="section see"><dt>See also</dt><dd>class <a class="el" href="classEigen_1_1TriangularView.html" title="Expression of a triangular part in a matrix. ">TriangularView</a>, class <a class="el" href="classEigen_1_1SelfAdjointView.html" title="Expression of a selfadjoint matrix from a triangular part of a dense matrix. ">SelfAdjointView</a></dd></dl>
<h1><a class="anchor" id="TriangularSolveInPlace"></a>
Triangular in-place solving</h1>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th></tr>
<tr>
<td><div class="fragment"><div class="line">A.triangularSolveInPlace&lt;XxxTriangular&gt;(Y);</div></div><!-- fragment --></td><td><div class="fragment"><div class="line">A.triangularView&lt;Xxx&gt;().solveInPlace(Y);</div></div><!-- fragment --> </td></tr>
</table>
<h1><a class="anchor" id="Decompositions"></a>
Matrix decompositions</h1>
<p>Some of <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2's matrix decompositions have been renamed in <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, while some others have been removed and are replaced by other decompositions in <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3.</p>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2 </th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th><th>Notes  </th></tr>
<tr>
<td>LU </td><td><a class="el" href="classEigen_1_1FullPivLU.html" title="LU decomposition of a matrix with complete pivoting, and related features. ">FullPivLU</a> </td><td class="alt">See also the new <a class="el" href="classEigen_1_1PartialPivLU.html" title="LU decomposition of a matrix with partial pivoting, and related features. ">PartialPivLU</a>, it's much faster  </td></tr>
<tr>
<td>QR </td><td><a class="el" href="classEigen_1_1HouseholderQR.html" title="Householder QR decomposition of a matrix. ">HouseholderQR</a> </td><td class="alt">See also the new <a class="el" href="classEigen_1_1ColPivHouseholderQR.html" title="Householder rank-revealing QR decomposition of a matrix with column-pivoting. ">ColPivHouseholderQR</a>, it's more reliable  </td></tr>
<tr>
<td>SVD </td><td><a class="el" href="classEigen_1_1JacobiSVD.html" title="Two-sided Jacobi SVD decomposition of a rectangular matrix. ">JacobiSVD</a> </td><td class="alt">We currently don't have a bidiagonalizing SVD; of course this is planned.  </td></tr>
<tr>
<td><a class="el" href="classEigen_1_1EigenSolver.html" title="Computes eigenvalues and eigenvectors of general matrices. ">EigenSolver</a> and friends </td><td><div class="fragment"><div class="line"><span class="preprocessor">#include&lt;Eigen/Eigenvalues&gt;</span> </div></div><!-- fragment -->  </td><td class="alt">Moved to separate module  </td></tr>
</table>
<h1><a class="anchor" id="LinearSolvers"></a>
Linear solvers</h1>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3</th><th>Notes </th></tr>
<tr>
<td><div class="fragment"><div class="line">A.lu();</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">A.fullPivLu();</div></div><!-- fragment --> </td><td class="alt">Now A.lu() returns a <a class="el" href="classEigen_1_1PartialPivLU.html" title="LU decomposition of a matrix with partial pivoting, and related features. ">PartialPivLU</a> </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.lu().solve(B,&amp;X);</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">X = A.lu().solve(B);</div><div class="line">X = A.fullPivLu().solve(B);</div></div><!-- fragment --> </td><td class="alt">The returned by value is fully optimized </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.llt().solve(B,&amp;X);</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">X = A.llt().solve(B);</div><div class="line">X = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;.llt().solve(B);</div><div class="line">X = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;.llt().solve(B);</div></div><!-- fragment --> </td><td class="alt">The returned by value is fully optimized and <br />
the selfadjointView API allows you to select the <br />
triangular part to work on (default is lower part) </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.llt().solveInPlace(B);</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">B = A.llt().solve(B);</div><div class="line">B = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;.llt().solve(B);</div><div class="line">B = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;.llt().solve(B);</div></div><!-- fragment --> </td><td class="alt">In place solving </td></tr>
<tr>
<td><div class="fragment"><div class="line">A.ldlt().solve(B,&amp;X);</div></div><!-- fragment --> </td><td><div class="fragment"><div class="line">X = A.ldlt().solve(B);</div><div class="line">X = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdaf581029282d421eee5aae14238c6f749">Lower</a>&gt;.ldlt().solve(B);</div><div class="line">X = A.selfadjointView&lt;<a class="code" href="group__enums.html#gga39e3366ff5554d731e7dc8bb642f83cdafca2ccebb604f171656deb53e8c083c1">Upper</a>&gt;.ldlt().solve(B);</div></div><!-- fragment --> </td><td class="alt">The returned by value is fully optimized and <br />
the selfadjointView API allows you to select the <br />
triangular part to work on </td></tr>
</table>
<h1><a class="anchor" id="GeometryModule"></a>
Changes in the Geometry module</h1>
<p>The Geometry module is the one that changed the most. If you rely heavily on it, it's probably a good idea to use the <a href="http://eigen.tuxfamily.org/dox-3.2/Eigen2SupportModes.html">"Eigen 2 support modes"</a> to perform your migration.</p>
<h1><a class="anchor" id="Transform"></a>
The Transform class</h1>
<p>In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2, the <a class="el" href="classEigen_1_1Transform.html" title="Represents an homogeneous transformation in a N dimensional space. ">Transform</a> class didn't really know whether it was a projective or affine transformation. In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, it takes a new <em>Mode</em> template parameter, which indicates whether it's <em>Projective</em> or <em>Affine</em> transform. There is no default value.</p>
<p>The Transform3f (etc) typedefs are no more. In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, the <a class="el" href="classEigen_1_1Transform.html" title="Represents an homogeneous transformation in a N dimensional space. ">Transform</a> typedefs explicitly refer to the <em>Projective</em> and <em>Affine</em> modes:</p>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3</th><th>Notes </th></tr>
<tr>
<td>Transform3f  </td><td>Affine3f or Projective3f  </td><td>Of course 3f is just an example here   </td></tr>
</table>
<h1><a class="anchor" id="LazyVsNoalias"></a>
Lazy evaluation and noalias</h1>
<p>In <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> all operations are performed in a lazy fashion except the matrix products which are always evaluated into a temporary by default. In Eigen2, lazy evaluation could be enforced by tagging a product using the .lazy() function. However, in complex expressions it was not easy to determine where to put the lazy() function. In Eigen3, the lazy() feature has been superseded by the <a class="el" href="classEigen_1_1MatrixBase.html#a2c1085de7645f23f240876388457da0b">MatrixBase::noalias()</a> function which can be used on the left hand side of an assignment when no aliasing can occur. Here is an example: </p><div class="fragment"><div class="line"><a class="code" href="group__matrixtypedefs.html#ga731599f782380312960376c43450eb48">MatrixXf</a> a, b, c;</div><div class="line">...</div><div class="line">c.noalias() += 2 * a.transpose() * b;</div></div><!-- fragment --><p> However, the noalias mechanism does not cover all the features of the old .lazy(). Indeed, in some extremely rare cases, it might be useful to explicit request for a lay product, i.e., for a product which will be evaluated one coefficient at once, on request, just like any other expressions. To this end you can use the <a class="el" href="classEigen_1_1MatrixBase.html#ae0c280b1066c14ed577021f38876527f">MatrixBase::lazyProduct()</a> function, however we strongly discourage you to use it unless you are sure of what you are doing, i.e., you have rigourosly measured a speed improvement.</p>
<h1><a class="anchor" id="AlignMacros"></a>
Alignment-related macros</h1>
<p>The EIGEN_ALIGN_128 macro has been renamed to EIGEN_ALIGN16. Don't be surprised, it's just that we switched to counting in bytes ;-)</p>
<p>The <a class="el" href="TopicPreprocessorDirectives.html#TopicPreprocessorDirectivesPerformance">EIGEN_DONT_ALIGN </a> option still exists in <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3, but it has a new cousin: <a class="el" href="TopicPreprocessorDirectives.html#TopicPreprocessorDirectivesPerformance">EIGEN_DONT_ALIGN_STATICALLY.</a> It allows to get rid of all static alignment issues while keeping alignment of dynamic-size heap-allocated arrays. Vectorization of statically allocated arrays is still preserved (unless you define <a class="el" href="TopicPreprocessorDirectives.html#TopicPreprocessorDirectivesPerformance">EIGEN_UNALIGNED_VECTORIZE </a> =0), at the cost of unaligned memory stores.</p>
<h1><a class="anchor" id="AlignedMap"></a>
Aligned Map objects</h1>
<p>A common issue with <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2 was that when mapping an array with <a class="el" href="classEigen_1_1Map.html" title="A matrix or vector expression mapping an existing array of data. ">Map</a>, there was no way to tell <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> that your array was aligned. There was a ForceAligned option but it didn't mean that; it was just confusing and has been removed.</p>
<p>New in Eigen3 is the <a class="el" href="group__enums.html#gga45fe06e29902b7a2773de05ba27b47a1ae12d0f8f869c40c76128260af2242bc8">Aligned</a> option. See the documentation of class <a class="el" href="classEigen_1_1Map.html" title="A matrix or vector expression mapping an existing array of data. ">Map</a>. Use it like this: </p><div class="fragment"><div class="line">Map&lt;Vector4f, Aligned&gt; myMappedVector(some_aligned_array);</div></div><!-- fragment --><p> There also are related convenience static methods, which actually are the preferred way as they take care of such things as constness: </p><div class="fragment"><div class="line">result = Vector4f::MapAligned(some_aligned_array);</div></div><!-- fragment --><h1><a class="anchor" id="StdContainers"></a>
STL Containers</h1>
<p>In Eigen2, <code>#include&lt;Eigen/StdVector&gt;</code> tweaked std::vector to automatically align elements. The problem was that that was quite invasive. In Eigen3, we only override standard behavior if you use Eigen::aligned_allocator&lt;T&gt; as your allocator type. So for example, if you use std::vector&lt;Matrix4f&gt;, you need to do the following change (note that <a class="el" href="classEigen_1_1aligned__allocator.html" title="STL compatible allocator to use with with 16 byte aligned types. ">aligned_allocator</a> is under namespace <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a>):</p>
<table class="manual">
<tr>
<th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 2</th><th><a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a> 3 </th></tr>
<tr>
<td><div class="fragment"><div class="line">std::vector&lt;Matrix4f&gt; </div></div><!-- fragment -->  </td><td><div class="fragment"><div class="line">std::vector&lt;Matrix4f, aligned_allocator&lt;Matrix4f&gt; &gt; </div></div><!-- fragment -->   </td></tr>
</table>
<h1><a class="anchor" id="eiPrefix"></a>
Internal ei_ prefix</h1>
<p>In Eigen2, global internal functions and structures were prefixed by <code>ei_</code>. In Eigen3, they all have been moved into the more explicit <code>internal</code> namespace. So, e.g., <code>ei_sqrt(x)</code> now becomes <code>internal::sqrt(x)</code>. Of course it is not recommended to rely on <a class="el" href="namespaceEigen.html" title="Namespace containing all symbols from the Eigen library. ">Eigen</a>'s internal features. </p>
</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>