Go to the documentation of this file.
7 #include <Eigen/Jacobi>
8 #include <Eigen/Householder>
9 #include <Eigen/IterativeLinearSolvers>
11 #include <unsupported/Eigen/SparseExtra>
13 #include <Eigen/SuperLUSupport>
16 #include <unsupported/Eigen/IterativeSolvers>
18 using namespace Eigen;
37 if (argc < 2) assert(
false &&
"please, give the matrix market file ");
42 cout <<
"End charging matrix " << endl;
43 bool iscomplex=
false, isvector=
false;
46 if (iscomplex) { cout<<
" Not for complex matrices \n";
return -1; }
47 if (isvector) { cout <<
"The provided file is not a matrix file\n";
return -1;}
51 A = temp.selfadjointView<
Lower>();
71 cout<<
"Time to load the matrix " <<
timer.
value() <<endl;
82 for (
int i = 0;
i <
n;
i++) tmp(
i) =
i;
90 cout<<
"Starting the factorization "<< endl;
93 cout<<
"Size of Input Matrix "<<
b.size()<<
"\n\n";
94 cout<<
"Rows and columns "<<
A.rows() <<
" " <<
A.cols() <<
"\n";
99 std::cout<<
"The solver failed \n";
104 cout <<
" Compute Time " << time_comp<< endl;
112 cout<<
" Time to solve " << time_solve << endl;
115 VectorXd tmp2 =
b -
A*
x;
116 double tempNorm = tmp2.norm()/
b.norm();
117 cout <<
"Relative norm of the computed solution : " << tempNorm <<
"\n";
121 cout <<
"Total time " << totaltime.
value() <<
"\n";
Namespace containing all symbols from the Eigen library.
A versatible sparse matrix representation.
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
Modified Incomplete Cholesky with dual threshold.
BiCGSTAB< SparseMatrix< double > > solver
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
bool loadMarketVector(VectorType &vec, const std::string &filename)
double value(int TIMER=CPU_TIMER) const
A conjugate gradient solver for sparse (or dense) self-adjoint problems.
int main(int argc, char **args)
Matrix< Scalar, Dynamic, Dynamic > DenseMatrix
bool getMarketHeader(const std::string &filename, int &sym, bool &iscomplex, bool &isvector)
bool loadMarket(SparseMatrixType &mat, const std::string &filename)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:04:24