mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-13 12:19:12 +08:00
adapt to API changes
This commit is contained in:
parent
59a0c4a0d2
commit
c7ae261ac0
@ -227,10 +227,9 @@ inline bool test_ei_isMuchSmallerThan(const MatrixBase<Derived>& m,
|
|||||||
return m.isMuchSmallerThan(s, test_precision<typename ei_traits<Derived>::Scalar>());
|
return m.isMuchSmallerThan(s, test_precision<typename ei_traits<Derived>::Scalar>());
|
||||||
}
|
}
|
||||||
|
|
||||||
template<typename Derived>
|
template<typename MatrixType>
|
||||||
void createRandomMatrixOfRank(int desired_rank, int rows, int cols, Eigen::MatrixBase<Derived>& m)
|
void createRandomMatrixOfRank(int desired_rank, int rows, int cols, MatrixType& m)
|
||||||
{
|
{
|
||||||
typedef Derived MatrixType;
|
|
||||||
typedef typename ei_traits<MatrixType>::Scalar Scalar;
|
typedef typename ei_traits<MatrixType>::Scalar Scalar;
|
||||||
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
|
typedef Matrix<Scalar, MatrixType::ColsAtCompileTime, 1> VectorType;
|
||||||
|
|
||||||
@ -244,7 +243,7 @@ void createRandomMatrixOfRank(int desired_rank, int rows, int cols, Eigen::Matri
|
|||||||
|
|
||||||
HouseholderQR<MatrixType> qra(a);
|
HouseholderQR<MatrixType> qra(a);
|
||||||
HouseholderQR<MatrixType> qrb(b);
|
HouseholderQR<MatrixType> qrb(b);
|
||||||
m = (qra.matrixQ() * d * qrb.matrixQ()).lazy();
|
m = qra.matrixQ() * d * qrb.matrixQ();
|
||||||
}
|
}
|
||||||
|
|
||||||
} // end namespace Eigen
|
} // end namespace Eigen
|
||||||
|
Loading…
x
Reference in New Issue
Block a user