Go to the documentation of this file.
7 #ifndef GEN_EIGS_BASE_H
8 #define GEN_EIGS_BASE_H
170 if (nev_new == 1 &&
m_ncv >= 6)
172 else if (nev_new == 1 &&
m_ncv > 3)
175 if (nev_new >
m_ncv - 2)
196 SortEigenvalue<Complex, SelectionRule> sorting(evals.
data(), evals.size());
197 std::vector<int>
ind = sorting.index();
218 std::vector<int>
ind = sorting.index();
227 ind = sorting.index();
233 ind = sorting.index();
239 ind = sorting.index();
245 ind = sorting.index();
251 ind = sorting.index();
255 throw std::invalid_argument(
"unsupported sorting rule");
290 if (nev < 1 || nev >
m_n - 2)
291 throw std::invalid_argument(
"nev must satisfy 1 <= nev <= n - 2, n is the size of matrix");
293 if (ncv < nev + 2 || ncv >
m_n)
294 throw std::invalid_argument(
"ncv must satisfy nev + 2 <= ncv <= n, n is the size of matrix");
300 virtual ~GenEigsBase() {}
343 SimpleRandom<Scalar>
rng(0);
374 Index i, nconv = 0, nev_adj;
375 for (
i = 0;
i < maxit;
i++)
482 #endif // GEN_EIGS_BASE_H
Eigen::Matrix< Scalar, Eigen::Dynamic, 1 > Vector
Namespace containing all symbols from the Eigen library.
@ LARGEST_IMAG
Select eigenvalues with largest imaginary part (in magnitude). Only for general eigen solvers.
Array< double, 1, 3 > e(1./3., 0.5, 2.)
void init(MapConstVec &v0, Index &op_counter)
const Matrix & matrix_H() const
@ SMALLEST_REAL
Select eigenvalues with smallest real part. Only for general eigen solvers.
EIGEN_DEVICE_FUNC EIGEN_STRONG_INLINE void swap(DenseBase< OtherDerived > &other)
const Matrix & matrix_V() const
Eigen::Matrix< Complex, Eigen::Dynamic, 1 > ComplexVector
Index num_converged(Scalar tol)
void compute(ConstGenericMatrix &mat, const Scalar &s, const Scalar &t)
General-purpose arrays with easy API for coefficient-wise operations.
ComplexMatrix eigenvectors(Index nvec) const
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 ComplexVector & eigenvalues() const
void apply_YQ(GenericMatrix Y) const
Eigen::Array< Scalar, Eigen::Dynamic, 1 > Array
@ LARGEST_REAL
Select eigenvalues with largest real part. Only for general eigen solvers.
static bool is_conj(const Complex &v1, const Complex &v2)
ComplexMatrix eigenvectors()
virtual void compute(ConstGenericMatrix &mat, const Scalar &shift=Scalar(0))
Index num_iterations() const
std::complex< Scalar > Complex
void init(const Scalar *init_resid)
Eigen::Matrix< Complex, Eigen::Dynamic, Eigen::Dynamic > ComplexMatrix
void apply_YQ(GenericMatrix Y) const
Eigen::Map< Vector > MapVec
Eigen::Map< Matrix > MapMat
Index compute(Index maxit=1000, Scalar tol=1e-10, int sort_rule=LARGEST_MAGN)
ArnoldiOp< Scalar, OpType, BOpType > ArnoldiOpType
ComplexVector eigenvalues() const
Jet< T, N > pow(const Jet< T, N > &f, double g)
AnnoyingScalar conj(const AnnoyingScalar &x)
A matrix or vector expression mapping an existing array of data.
void compress_H(const DoubleShiftQR< Scalar > &decomp)
virtual void sort_ritzpair(int sort_rule)
Arnoldi< Scalar, ArnoldiOpType > ArnoldiFac
@ SMALLEST_IMAG
Select eigenvalues with smallest imaginary part (in magnitude). Only for general eigen solvers.
The quaternion class used to represent 3D orientations and rotations.
Index nev_adjusted(Index nconv)
ComplexMatrix eigenvectors() const
Array< int, Dynamic, 1 > v
virtual void factorize_from(Index from_k, Index to_m, Index &op_counter)
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)
Eigen::Matrix< Scalar, Eigen::Dynamic, Eigen::Dynamic > Matrix
Eigen::Map< const Vector > MapConstVec
static bool is_complex(const Complex &v)
EIGEN_DEFAULT_DENSE_INDEX_TYPE Index
The Index type as used for the API.
Index num_operations() const
gtsam
Author(s):
autogenerated on Sat Nov 16 2024 04:02:19