namespace Eigen { /** \page Eigen2ToEigen3 Porting from Eigen2 to Eigen3 The goals of this page is to enumerate the API changes between Eigen2 and Eigen3, and to help porting an application from Eigen2 to Eigen3. \b Table \b of \b contents - \ref CompatibilitySupport - \ref VectorBlocks - \ref TriangularViews - \ref TriangularSolveInPlace - \ref Using - \ref CoefficientWiseOperations - \ref Corners - \ref LazyVsNoalias \section CompatibilitySupport Eigen2 compatibility support In order to ease the switch from Eigen2 to Eigen3, Eigen3 features a compatibility mode which can be enabled by defining the EIGEN2_SUPPORT preprocessor token \b before including any Eigen header (typically it should be set in your project options). \section VectorBlocks Vector blocks
Eigen 2 | Eigen 3 |
\code
vector.start(length)
vector.start | \code
vector.head(length)
vector.head |
Eigen 2 | Eigen 3 |
\code
matrix.corner(TopLeft,r,c)
matrix.corner(TopRight,r,c)
matrix.corner(BottomLeft,r,c)
matrix.corner(BottomRight,r,c)
matrix.corner | \code
matrix.topLeftCorner(r,c)
matrix.topRightCorner(r,c)
matrix.bottomLeftCorner(r,c)
matrix.bottomRightCorner(r,c)
matrix.topLeftCorner |
Eigen 2 | Eigen 3 | |
\code A.triangularSolveInPlace | \code A.triangularView | |
\code UpperTriangular LowerTriangular UnitUpperTriangular UnitLowerTriangular StrictlyUpperTriangular StrictlyLowerTriangular \endcode | \code Upper Lower UnitUpper UnitLower StrictlyUpper StrictlyLower \endcode |