Go to the documentation of this file.
7 #ifndef SYM_EIGS_BASE_H
8 #define SYM_EIGS_BASE_H
136 if (nev_new == 1 &&
m_ncv >= 6)
138 else if (nev_new == 1 &&
m_ncv > 2)
141 if (nev_new >
m_ncv - 1)
154 SortEigenvalue<Scalar, SelectionRule> sorting(evals.
data(), evals.size());
155 std::vector<int>
ind = sorting.index();
167 std::vector<int> ind_copy(
ind);
173 ind[
i] = ind_copy[
i / 2];
198 std::vector<int>
ind = sorting.index();
207 ind = sorting.index();
213 ind = sorting.index();
219 ind = sorting.index();
223 throw std::invalid_argument(
"unsupported sorting rule");
258 if (nev < 1 || nev >
m_n - 1)
259 throw std::invalid_argument(
"nev must satisfy 1 <= nev <= n - 1, n is the size of matrix");
261 if (ncv <= nev || ncv >
m_n)
262 throw std::invalid_argument(
"ncv must satisfy nev < ncv <= n, n is the size of matrix");
268 virtual ~SymEigsBase() {}
311 SimpleRandom<Scalar>
rng(0);
340 Index i, nconv = 0, nev_adj;
341 for (
i = 0;
i < maxit;
i++)
448 #endif // SYM_EIGS_BASE_H
Lanczos< Scalar, ArnoldiOpType > LanczosFac
void compute(ConstGenericMatrix &mat, const Scalar &shift=Scalar(0))
Namespace containing all symbols from the Eigen library.
Eigen::Map< Vector > MapVec
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void init(MapConstVec &v0, Index &op_counter)
const Matrix & matrix_H() const
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > &other)
const Matrix & matrix_V() const
Index num_operations() const
Vector eigenvalues() const
General-purpose arrays with easy API for coefficient-wise operations.
cout<< "Here is the matrix m:"<< endl<< m<< endl;Matrix< ptrdiff_t, 3, 1 > res
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void resize(Index rows, Index cols)
const Vector & eigenvalues() const
Index num_iterations() const
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Eigen::Array< Scalar, Eigen::Dynamic, 1 > Array
virtual Matrix eigenvectors() const
Eigen::Map< const Vector > MapConstVec
void factorize_from(Index from_k, Index to_m, Index &op_counter)
void apply_YQ(GenericMatrix Y) const
Index compute(Index maxit=1000, Scalar tol=1e-10, int sort_rule=LARGEST_ALGE)
Eigen::Map< Matrix > MapMat
Index nev_adjusted(Index nconv)
Jet< T, N > pow(const Jet< T, N > &f, double g)
A matrix or vector expression mapping an existing array of data.
void init(const Scalar *init_resid)
const Matrix & eigenvectors() const
The quaternion class used to represent 3D orientations and rotations.
Index num_converged(Scalar tol)
virtual void sort_ritzpair(int sort_rule)
EIGEN_DEVICE_FUNC const EIGEN_STRONG_INLINE Scalar * data() const
Eigen::Array< bool, Eigen::Dynamic, 1 > BoolArray
@ SUCCESSFUL
Computation was successful.
void compress_V(const Matrix &Q)
EIGEN_DEVICE_FUNC Derived & setZero(Index size)
@ SMALLEST_ALGE
Select eigenvalues with smallest algebraic value. Only for symmetric eigen solvers.
void compress_H(const TridiagQR< Scalar > &decomp)
virtual Matrix eigenvectors(Index nvec) const
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
ArnoldiOp< Scalar, OpType, BOpType > ArnoldiOpType
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:05:22