diff options
author | Gael Guennebaud <g.gael@free.fr> | 2019-02-20 15:23:23 +0100 |
---|---|---|
committer | Gael Guennebaud <g.gael@free.fr> | 2019-02-20 15:23:23 +0100 |
commit | 2a39659d793fcde656593bbf01948bc0bd568181 (patch) | |
tree | 0f86aa74d93cde904498af80050e2b3eae8b1164 /Eigen/src/Core/Matrix.h | |
parent | 302377110a26d88a9e0bad8322324227eda2e1c4 (diff) |
Add fully generic Vector<Type,Size> and RowVector<Type,Size> type aliases.
Diffstat (limited to 'Eigen/src/Core/Matrix.h')
-rw-r--r-- | Eigen/src/Core/Matrix.h | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/Eigen/src/Core/Matrix.h b/Eigen/src/Core/Matrix.h index e7df4a901..4b714328c 100644 --- a/Eigen/src/Core/Matrix.h +++ b/Eigen/src/Core/Matrix.h @@ -467,8 +467,10 @@ class Matrix * They follow the same pattern as above except that the scalar type suffix is replaced by a * template parameter, i.e.: * - `MatrixSize<Type>` where `Size` can be \c 2,\c 3,\c 4 for fixed size square matrices or \c X for dynamic size. - * - `MatrixXSize<Type>`and `MatrixSizeX<Type>` where `Size` can be \c 2,\c 3,\c 4 for hybrid dynamic/fixed matrices. + * - `MatrixXSize<Type>` and `MatrixSizeX<Type>` where `Size` can be \c 2,\c 3,\c 4 for hybrid dynamic/fixed matrices. * - `VectorSize<Type>` and `RowVectorSize<Type>` for column and row vectors. + * + * With \cpp11, you can also use fully generic column and row vector types: `Vector<Type,Size>` and `RowVector<Type,Size>`. * * \sa class Matrix */ @@ -540,6 +542,16 @@ EIGEN_MAKE_FIXED_TYPEDEFS(2) EIGEN_MAKE_FIXED_TYPEDEFS(3) EIGEN_MAKE_FIXED_TYPEDEFS(4) +/** \ingroup matrixtypedefs + * \brief \cpp11 */ +template <typename Type, int Size> +using Vector = Matrix<Type, Size, 1>; + +/** \ingroup matrixtypedefs + * \brief \cpp11 */ +template <typename Type, int Size> +using RowVector = Matrix<Type, 1, Size>; + #undef EIGEN_MAKE_TYPEDEFS #undef EIGEN_MAKE_FIXED_TYPEDEFS |