9 #define EIGEN_NO_DEBUG_SMALL_PRODUCT_BLOCKS 11 #include <Eigen/SPQRSupport> 14 template<
typename MatrixType,
typename DenseMat>
19 int rows = internal::random<int>(1,maxRows);
20 int cols = internal::random<int>(1,
rows);
21 double density = (
std::max)(8./(rows*cols), 0.01);
41 b = DenseVector::Random(m);
45 std::cerr <<
"sparse QR factorization failed\n";
52 std::cerr <<
"sparse QR factorization failed\n";
57 refX = dA.colPivHouseholderQr().solve(b);
58 VERIFY(x.isApprox(refX,test_precision<Scalar>()));
62 CALL_SUBTEST_1(test_spqr_scalar<double>());
int generate_sparse_rectangular_problem(MatrixType &A, DenseMat &dA, int maxRows=300, int maxCols=300)
const Solve< SPQR< _MatrixType >, Rhs > solve(const MatrixBase< Rhs > &b) const
BiCGSTAB< SparseMatrix< double > > solver
Matrix< SCALARA, Dynamic, Dynamic > A
Matrix< Scalar, Dynamic, 1 > DenseVector
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
ComputationInfo info() const
Reports whether previous computation was successful.
void compute(const _MatrixType &matrix)
Sparse QR factorization based on SuiteSparseQR library.
set noclip points set clip one set noclip two set bar set border lt lw set xdata set ydata set zdata set x2data set y2data set boxwidth set dummy x