mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-01-30 17:40:05 +08:00
test block objects for sparse solving
This commit is contained in:
parent
c58b759865
commit
9d2b6dd71a
@ -72,6 +72,16 @@ void check_sparse_solving(Solver& solver, const typename Solver::MatrixType& A,
|
||||
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
|
||||
|
||||
VERIFY(x.isApprox(refX,test_precision<Scalar>()));
|
||||
|
||||
// test Block as the result and rhs:
|
||||
{
|
||||
DenseRhs x(db.rows(), db.cols());
|
||||
DenseRhs b(db), oldb(db);
|
||||
x.setZero();
|
||||
x.block(0,0,x.rows(),x.cols()) = solver.solve(b.block(0,0,b.rows(),b.cols()));
|
||||
VERIFY(oldb.isApprox(b) && "sparse solver testing: the rhs should not be modified!");
|
||||
VERIFY(x.isApprox(refX,test_precision<Scalar>()));
|
||||
}
|
||||
}
|
||||
|
||||
template<typename Solver, typename Rhs>
|
||||
|
Loading…
Reference in New Issue
Block a user