1 #ifndef TEST_SOLVERBASE_H
2 #define TEST_SOLVERBASE_H
4 template <
typename DstType,
typename RhsType,
typename MatrixType,
typename SolverType>
7 DstType
m2 = DstType::Random(
cols, cols2);
9 DstType solver_solution = DstType::Random(
cols, cols2);
10 solver._solve_impl(m3, solver_solution);
12 solver_solution = DstType::Random(
cols, cols2);
13 solver_solution =
solver.solve(m3);
16 m3 = RhsType::Random(
rows, cols2);
18 RhsType solver_solution2 = RhsType::Random(
rows, cols2);
19 solver.template _solve_impl_transposed<false>(
m2, solver_solution2);
21 solver_solution2 = RhsType::Random(
rows, cols2);
22 solver_solution2 =
solver.transpose().solve(
m2);
25 m3 = RhsType::Random(
rows, cols2);
27 solver_solution2 = RhsType::Random(
rows, cols2);
28 solver.template _solve_impl_transposed<true>(
m2, solver_solution2);
30 solver_solution2 = RhsType::Random(
rows, cols2);
31 solver_solution2 =
solver.adjoint().solve(
m2);
34 m2 = DstType::Random(
cols, cols2);
BiCGSTAB< SparseMatrix< double > > solver
Definition: BiCGSTAB_simple.cpp:5
int rows
Definition: Tutorial_commainit_02.cpp:1
int cols
Definition: Tutorial_commainit_02.cpp:1
MatrixXf MatrixType
Definition: benchmark-blocking-sizes.cpp:52
Eigen::Map< Eigen::Matrix< T, Eigen::Dynamic, Eigen::Dynamic, Eigen::ColMajor >, 0, Eigen::OuterStride<> > matrix(T *data, int rows, int cols, int stride)
Definition: common.h:85
#define VERIFY_IS_APPROX(a, b)
Definition: integer_types.cpp:13
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Definition: Meta.h:83
void check_solverbase(const MatrixType &matrix, const SolverType &solver, Index rows, Index cols, Index cols2)
Definition: solverbase.h:5