aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen
diff options
context:
space:
mode:
authorGravatar Gael Guennebaud <g.gael@free.fr>2018-06-08 16:50:17 +0200
committerGravatar Gael Guennebaud <g.gael@free.fr>2018-06-08 16:50:17 +0200
commit89d65bb9d6ed8ebc9ce297a3fad90d78ba6cbbbb (patch)
tree11d3bb0e52aa5cc5657756f99c455484086a9857 /Eigen
parentf05dea6b2326836e5e0243fbaffbece84b833d64 (diff)
bug #1531: expose NumDimensions for compatibility with Tensor
Diffstat (limited to 'Eigen')
-rw-r--r--Eigen/src/Core/DenseBase.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/Eigen/src/Core/DenseBase.h b/Eigen/src/Core/DenseBase.h
index 53b427b17..8b994f35c 100644
--- a/Eigen/src/Core/DenseBase.h
+++ b/Eigen/src/Core/DenseBase.h
@@ -157,6 +157,11 @@ template<typename Derived> class DenseBase
* we are dealing with a column-vector (if there is only one column) or with
* a row-vector (if there is only one row). */
+ NumDimensions = int(MaxSizeAtCompileTime) == 1 ? 0 : bool(IsVectorAtCompileTime) ? 1 : 2,
+ /**< This value is equal to Tensor::NumDimensions, i.e. 0 for scalars, 1 for vectors,
+ * and 2 for matrices.
+ */
+
Flags = internal::traits<Derived>::Flags,
/**< This stores expression \ref flags flags which may or may not be inherited by new expressions
* constructed from this one. See the \ref flags "list of flags".