mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-18 14:34:17 +08:00
let createRandomMatrixOfRank support fixed-size!
This commit is contained in:
parent
90735b6a9c
commit
a848ed02ad
@ -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);
|
||||||
|
Loading…
Reference in New Issue
Block a user