Go to the documentation of this file.
26 #include <Eigen/Sparse>
57 template <
class Operator>
79 const std::optional<Vector>
initial = {})
116 const double ritzValue =
x.dot(
A_ *
x);
117 const double error = (
A_ *
x - ritzValue *
x).norm();
132 bool isConverged =
false;
134 for (
size_t i = 0;
i < maxIterations && !isConverged;
i++) {
typedef and functions to augment Eigen's VectorXd
size_t nrIterations() const
Return the number of iterations.
Compute maximum Eigenpair with power method.
typedef and functions to augment Eigen's MatrixXd
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
Vector powerIteration() const
double eigenvalue() const
Return the eigenvalue.
bool converged(double tol) const
Vector eigenvector() const
Return the eigenvector.
Vector powerIteration(const Vector &x) const
Eigen::SparseMatrix< double > Sparse
bool compute(size_t maxIterations, double tol)
PowerMethod(const Operator &A, const std::optional< Vector > initial={})
Construct from the aim matrix and intial ritz vector.
gtsam
Author(s):
autogenerated on Sun Dec 22 2024 04:12:46