mirror of
https://gitlab.com/libeigen/eigen.git
synced 2026-04-10 11:34:33 +08:00
Merge.
This commit is contained in:
@@ -202,7 +202,6 @@ ALIASES = "only_for_vectors=This is only for vectors (either row-
|
||||
"geometry_module=This is defined in the %Geometry module. \code #include <Eigen/Geometry> \endcode" \
|
||||
"householder_module=This is defined in the %Householder module. \code #include <Eigen/Householder> \endcode" \
|
||||
"jacobi_module=This is defined in the %Jacobi module. \code #include <Eigen/Jacobi> \endcode" \
|
||||
"leastsquares_module=This is defined in the %LeastSquares module. \code #include <Eigen/LeastSquares> \endcode" \
|
||||
"lu_module=This is defined in the %LU module. \code #include <Eigen/LU> \endcode" \
|
||||
"qr_module=This is defined in the %QR module. \code #include <Eigen/QR> \endcode" \
|
||||
"svd_module=This is defined in the %SVD module. \code #include <Eigen/SVD> \endcode" \
|
||||
|
||||
@@ -14,7 +14,7 @@ Eigen can be extended in several ways, for instance, by defining global methods,
|
||||
|
||||
In this section we will see how to add custom methods to MatrixBase. Since all expressions and matrix types inherit MatrixBase, adding a method to MatrixBase make it immediately available to all expressions ! A typical use case is, for instance, to make Eigen compatible with another API.
|
||||
|
||||
You certainly know that in C++ it is not possible to add methods to an extending class. So how that's possible ? Here the trick is to include in the declaration of MatrixBase a file defined by the preprocessor token \c EIGEN_MATRIXBASE_PLUGIN:
|
||||
You certainly know that in C++ it is not possible to add methods to an existing class. So how that's possible ? Here the trick is to include in the declaration of MatrixBase a file defined by the preprocessor token \c EIGEN_MATRIXBASE_PLUGIN:
|
||||
\code
|
||||
class MatrixBase {
|
||||
// ...
|
||||
@@ -142,10 +142,13 @@ namespace Eigen {
|
||||
template<> struct NumTraits<adtl::adouble>
|
||||
{
|
||||
typedef adtl::adouble Real;
|
||||
typedef adtl::adouble FloatingPoint;
|
||||
typedef adtl::adouble NonInteger;
|
||||
typedef adtl::adouble Nested;
|
||||
|
||||
enum {
|
||||
IsComplex = 0,
|
||||
HasFloatingPoint = 1,
|
||||
IsInteger = 0,
|
||||
IsSigned,
|
||||
ReadCost = 1,
|
||||
AddCost = 1,
|
||||
MulCost = 1
|
||||
|
||||
Reference in New Issue
Block a user