lscg.cpp File Reference
#include "sparse_solver.h"
#include <Eigen/IterativeLinearSolvers>

Functions

template<typename T >
void test_lscg_T ()
 
 EIGEN_DECLARE_TEST (lscg)
 

Function Documentation

◆ EIGEN_DECLARE_TEST()

EIGEN_DECLARE_TEST ( lscg  )
33  {
34  CALL_SUBTEST_1(test_lscg_T<double>());
35  CALL_SUBTEST_2(test_lscg_T<std::complex<double> >());
36 }
void test_lscg_T()
Definition: lscg.cpp:14
#define CALL_SUBTEST_1(FUNC)
Definition: split_test_helper.h:4
#define CALL_SUBTEST_2(FUNC)
Definition: split_test_helper.h:10

References CALL_SUBTEST_1, CALL_SUBTEST_2, and test_lscg_T().

◆ test_lscg_T()

template<typename T >
void test_lscg_T ( )
14  {
19 
20  CALL_SUBTEST(check_sparse_square_solving(lscg_colmajor_diag));
21  CALL_SUBTEST(check_sparse_square_solving(lscg_colmajor_I));
22 
25 
26  CALL_SUBTEST(check_sparse_square_solving(lscg_rowmajor_diag));
27  CALL_SUBTEST(check_sparse_square_solving(lscg_rowmajor_I));
28 
31 }
A naive preconditioner which approximates any matrix as the identity matrix.
Definition: BasicPreconditioners.h:181
A conjugate gradient solver for sparse (or dense) least-square problems.
Definition: LeastSquareConjugateGradient.h:147
#define CALL_SUBTEST(FUNC)
Definition: main.h:382
void check_sparse_square_solving(Solver &solver, int maxSize=300, int maxRealWorldSize=100000, bool checkDeficient=false)
Definition: sparse_solver.h:613
void check_sparse_leastsquare_solving(Solver &solver)
Definition: sparse_solver.h:738

References CALL_SUBTEST, check_sparse_leastsquare_solving(), and check_sparse_square_solving().

Referenced by EIGEN_DECLARE_TEST().