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 ChangeList - \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's header (typically it should be set in your project options). \section ChangeList List of changes in the API
Eigen 2 | Eigen 3 | Comments |
\code
vec.start(length)
vec.start | \code
vec.head(length)
vec.head | Trivial "search and replace". |
\code mat.cwise().XXX()\endcode | \code mat.array().XXX()\endcode | See \ref CoefficientWiseOperations. |
\code c = (a * b).lazy();\endcode | \code c.noalias() = a * b;\endcode | See \ref LazyVsNoalias. |
\code A.triangularSolveInPlace | \code A.triangularView | |
\code UpperTriangular LowerTriangular UnitUpperTriangular UnitLowerTriangular StrictlyUpperTriangular StrictlyLowerTriangular \endcode | \code Upper Lower UnitUpper UnitLower StrictlyUpper StrictlyLower \endcode | Trivial "search and replace". |
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 |