aboutsummaryrefslogtreecommitdiffhomepage
path: root/Eigen/src/Core/Random.h
diff options
context:
space:
mode:
Diffstat (limited to 'Eigen/src/Core/Random.h')
-rw-r--r--Eigen/src/Core/Random.h11
1 files changed, 7 insertions, 4 deletions
diff --git a/Eigen/src/Core/Random.h b/Eigen/src/Core/Random.h
index 6a8a9e726..0b6892d2e 100644
--- a/Eigen/src/Core/Random.h
+++ b/Eigen/src/Core/Random.h
@@ -43,12 +43,14 @@ template<typename MatrixType> class Random : NoOperatorEquals,
private:
enum {
RowsAtCompileTime = MatrixType::Traits::RowsAtCompileTime,
- ColsAtCompileTime = MatrixType::Traits::ColsAtCompileTime
+ ColsAtCompileTime = MatrixType::Traits::ColsAtCompileTime,
+ MaxRowsAtCompileTime = MatrixType::Traits::MaxRowsAtCompileTime,
+ MaxColsAtCompileTime = MatrixType::Traits::MaxColsAtCompileTime
};
const Random& _ref() const { return *this; }
- int _rows() const { return m_rows; }
- int _cols() const { return m_cols; }
+ int _rows() const { return m_rows.value(); }
+ int _cols() const { return m_cols.value(); }
Scalar _coeff(int, int) const
{
@@ -65,7 +67,8 @@ template<typename MatrixType> class Random : NoOperatorEquals,
}
protected:
- const int m_rows, m_cols;
+ const IntAtRunTimeIfDynamic<RowsAtCompileTime> m_rows;
+ const IntAtRunTimeIfDynamic<ColsAtCompileTime> m_cols;
};
/** \returns a random matrix (not an expression, the matrix is immediately evaluated).