MTL5 -- Matrix Template Library C++ API
mtl:: -- C++20 header-only linear algebra for mixed-precision algorithm design
Loading...
Searching...
No Matches
shift_invert.hpp File Reference
#include <cmath>
#include <complex>
#include <cstddef>
#include <limits>
#include <map>
#include <stdexcept>
#include <string>
#include <vector>
#include <mtl/mat/compressed2D.hpp>
#include <mtl/vec/dense_vector.hpp>
#include <mtl/sparse/factorization/sparse_lu.hpp>
#include <mtl/itl/eigen/arnoldi.hpp>
#include <type_traits>

Classes

class  mtl::sparse::shift_invert_operator< Value, Accumulator >
 LinearOperator applying (A - sigma*I)^{-1} via a cached sparse LU factorization: factor once, apply many. More...

Namespaces

namespace  mtl
namespace  mtl::sparse

Functions

template<typename Value, typename Parameters>
mat::compressed2D< Value > mtl::sparse::shift_diagonal (const mat::compressed2D< Value, Parameters > &A, Value sigma)
 Build B = A - sigma*I as a new CSR sparse matrix.
template<typename Accumulator = void, typename Value, typename Parameters>
itl::ritz_pairs< std::complex< Value > > mtl::sparse::sparse_eigs_shift_invert (const mat::compressed2D< Value, Parameters > &A, Value sigma, std::size_t k, std::size_t subspace=0, Value tol=Value(1e-8))
 Compute the k eigenvalues of a sparse matrix A nearest the shift sigma, with their eigenvectors, by Arnoldi on the shift-invert operator (A - sigma*I)^{-1}.
template<typename Accumulator = void, typename Value, typename Parameters>
itl::ritz_pairs< std::complex< Value > > mtl::sparse::sparse_eigs (const mat::compressed2D< Value, Parameters > &A, std::size_t k, itl::eigen_which which=itl::eigen_which::largest_magnitude, std::size_t subspace=0, Value tol=Value(1e-8))
 Compute the k eigenvalues of a sparse matrix A of largest magnitude (or per which) with eigenvectors, by Arnoldi applied directly to the sparse operator – no factorization.