Go to the documentation of this file.
4 #define EIGEN_SUPERLU_SUPPORT
5 #define EIGEN_UMFPACK_SUPPORT
6 #include <Eigen/Sparse>
26 #define MINDENSITY 0.0004
35 for (int _j=0; _j<NBTRIES; ++_j) { \
37 for (int _k=0; _k<REPEAT; ++_k) { \
48 std::cout <<
name <<
"..." << std::flush;
56 std::cout <<
":\t FAILED" << endl;
65 std::cout <<
" solve:\t" <<
timer.
value() << endl;
67 std::cout <<
" solve:\t" <<
" FAILED" << endl;
72 int main(
int argc,
char *argv[])
82 bool densedone =
false;
95 std::cout <<
"Eigen Dense\t" <<
density*100 <<
"%\n";
103 std::cout <<
"Eigen/dense:\t" <<
timer.
value() << endl;
109 std::cout <<
" solve:\t" <<
timer.
value() << endl;
115 #ifdef EIGEN_UMFPACK_SUPPORT
117 doEigen<Eigen::UmfPack>(
"Eigen/UmfPack (auto)", sm1,
b,
x, 0);
120 #ifdef EIGEN_SUPERLU_SUPPORT
125 doEigen<Eigen::SuperLU>(
"Eigen/SuperLU (COLAMD)", sm1,
b,
x, Eigen::ColApproxMinimumDegree);
void doEigen(const char *name, const EigenSparseMatrix &sm1, const VectorX &b, VectorX &x, int flags=0)
int main(int argc, char *argv[])
Annotation for function names.
void eiToDense(const EigenSparseMatrix &src, DenseMatrix &dst)
void fillMatrix(float density, int rows, int cols, EigenSparseMatrix &dst)
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
LU decomposition of a matrix with complete pivoting, and related features.
double value(int TIMER=CPU_TIMER) const
cout<< "Here is the matrix m:"<< endl<< m<< endl;Eigen::FullPivLU< Matrix5x3 > lu(m)
Matrix< Scalar, Dynamic, Dynamic > DenseMatrix
Matrix< Scalar, Dynamic, 1 > VectorX
Sparse supernodal LU factorization for general matrices.
gtsam
Author(s):
autogenerated on Thu Dec 19 2024 04:03:14