Go to the documentation of this file.
10 std::map<std::string,Array<float,1,8,DontAlign|RowMajor> >
results;
14 template<
typename Solver,
typename MatrixType>
17 if(
A.rows()!=
A.cols())
23 template<
typename Solver,
typename MatrixType>
29 template<
typename Scalar,
int Size>
39 BenchTimer t_llt, t_ldlt, t_lu, t_fplu, t_qr, t_cpqr, t_cod, t_fpqr, t_jsvd, t_bdcsvd;
80 results[
"CompleteOrthogonalDecomposition"][
id] = t_cod.
best();
91 labels.push_back(
"PartialPivLU");
92 labels.push_back(
"FullPivLU");
93 labels.push_back(
"HouseholderQR");
94 labels.push_back(
"ColPivHouseholderQR");
95 labels.push_back(
"CompleteOrthogonalDecomposition");
96 labels.push_back(
"FullPivHouseholderQR");
97 labels.push_back(
"JacobiSVD");
98 labels.push_back(
"BDCSVD");
104 sizes.push_back(Array2i(small,small));
105 sizes.push_back(Array2i(100,100));
106 sizes.push_back(Array2i(1000,1000));
107 sizes.push_back(Array2i(4000,4000));
108 sizes.push_back(Array2i(10000,small));
109 sizes.push_back(Array2i(10000,100));
110 sizes.push_back(Array2i(10000,1000));
111 sizes.push_back(Array2i(10000,4000));
115 for(
int k=0; k<
sizes.size(); ++k)
117 cout <<
sizes[k](0) <<
"x" <<
sizes[k](1) <<
"...\n";
118 bench<float,Dynamic>(k,
sizes[k](0),
sizes[k](1));
122 cout <<
"solver/size";
124 for(
int k=0; k<
sizes.size(); ++k)
126 std::stringstream
ss;
128 cout.width(10); cout <<
ss.str(); cout <<
" ";
135 cout.width(32); cout <<
labels[
i]; cout <<
" ";
137 for(
int k=0; k<
sizes.size(); ++k)
140 if(r(k)>=1e6) cout <<
"-";
148 cout <<
"<table class=\"manual\">" << endl;
149 cout <<
"<tr><th>solver/size</th>" << endl;
150 for(
int k=0; k<
sizes.size(); ++k)
151 cout <<
" <th>" <<
sizes[k](0) <<
"x" <<
sizes[k](1) <<
"</th>";
152 cout <<
"</tr>" << endl;
156 if(
i%2==1) cout <<
" class=\"alt\"";
157 cout <<
"><td>" <<
labels[
i] <<
"</td>";
159 for(
int k=0; k<
sizes.size(); ++k)
161 if(r(k)>=1e6) cout <<
"<td>-</td>";
164 cout <<
"<td>" << r(k);
168 cout <<
" <sup><a href=\"#note_ls\">*</a></sup>";
172 cout <<
"</tr>" << endl;
174 cout <<
"</table>" << endl;
Namespace containing all symbols from the Eigen library.
LU decomposition of a matrix with partial pivoting, and related features.
EIGEN_DONT_INLINE void llt(const Mat &A, const Mat &B, Mat &C)
EIGEN_DONT_INLINE void compute_norm_equation(Solver &solver, const MatrixType &A)
std::vector< Array2i > sizes
LU decomposition of a matrix with complete pivoting, and related features.
BiCGSTAB< SparseMatrix< double > > solver
Matrix< SCALARA, Dynamic, Dynamic, opt_A > A
static std::stringstream ss
std::vector< std::string > labels
JacobiSVD & compute(const MatrixType &matrix, unsigned int computationOptions)
Method performing the decomposition of given matrix using custom options.
Householder rank-revealing QR decomposition of a matrix with full pivoting.
static const Similarity3 id
class Bidiagonal Divide and Conquer SVD
#define BENCH(TIMER, TRIES, REP, CODE)
Complete orthogonal decomposition (COD) of a matrix.
Matrix< Scalar, Dynamic, Dynamic > Mat
EIGEN_DONT_INLINE void compute(Solver &solver, const MatrixType &A)
Robust Cholesky decomposition of a matrix with pivoting.
Householder rank-revealing QR decomposition of a matrix with column-pivoting.
Point2(* f)(const Point3 &, OptionalJacobian< 2, 3 >)
Two-sided Jacobi SVD decomposition of a rectangular matrix.
cout<< "Here is the matrix m:"<< endl<< m<< endl;Eigen::FullPivLU< Matrix5x3 > lu(m)
Standard Cholesky decomposition (LL^T) of a matrix and associated features.
HouseholderQR< MatrixXf > qr(A)
void bench(int id, int rows, int size=Size)
double best(int TIMER=CPU_TIMER) const
std::map< std::string, Array< float, 1, 8, DontAlign|RowMajor > > results
The matrix class, also used for vectors and row-vectors.
void bdcsvd(const MatrixType &a=MatrixType(), bool pickrandom=true)
const EIGEN_DEVICE_FUNC FloorReturnType floor() const
Householder QR decomposition of a matrix.
#define EIGEN_DONT_INLINE
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:10