let createRandomMatrixOfRank support fixed-size!

This commit is contained in:
Benoit Jacob 2009-08-23 17:33:31 -04:00
parent 90735b6a9c
commit a848ed02ad

View File

@ -231,7 +231,7 @@ template<typename MatrixType>
void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m) void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m)
{ {
typedef typename ei_traits<MatrixType>::Scalar Scalar; typedef typename ei_traits<MatrixType>::Scalar Scalar;
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType; typedef Matrix<Scalar, Dynamic, 1> VectorType;
MatrixType a = MatrixType::Random(rows,rows); MatrixType a = MatrixType::Random(rows,rows);
MatrixType d = MatrixType::Identity(rows,cols); MatrixType d = MatrixType::Identity(rows,cols);