4-parameter interpolation of a 1-dimensional function given two points for which function values and first derivatives are known. More...
Namespaces | |
| namespace | detail |
| namespace | interpolate_detail |
| namespace | log |
| namespace | subspace |
| namespace | util |
Classes | |
| class | ArrayHandlers |
| Class, containing a collection of array handlers used in IterativeSolver Provides a Builder sub-class, containing member functions to accumulate user-defined handlers, as well as determine and instantiate default handlers, based on container (template parameter) types. More... | |
| struct | CastOptions |
| Safely down-cast Options to one of the implementations. More... | |
| struct | DavidsonOptions |
| struct | decay |
| Decays CV and reference qualifiers same as std::decay, but also decays std::reference_wrapper to its underlying type. More... | |
| struct | decay< std::reference_wrapper< T > > |
| struct | has_iterator |
| struct | has_lapack_kernel |
Whether the dense kernels of this library dispatch T to LAPACK rather than to Eigen. More... | |
| class | Interpolator |
| The interpolant, in the precision of the problem it is used for. More... | |
| class | IterativeSolver |
| Base class defining the interface common to all iterative solvers. More... | |
| class | IterativeSolverTemplate |
| Implements IterativeSolver interface that is common to all solvers. More... | |
| class | LinearEigensystem |
| Interface for a specific iterative solver, it can add special member functions or variables. More... | |
| class | LinearEigensystemDavidson |
| One specific implementation of LinearEigensystem using Davidson's algorithm with modifications to manage near linear dependencies, and consequent numerical noise, in candidate expansion vectors. More... | |
| struct | LinearEigensystemDavidsonOptions |
| Allows setting and getting of options for LinearEigensystemDavidson instance via IterativeSolver base class. More... | |
| struct | LinearEigensystemOptions |
| class | LinearEigensystemRSPT |
| One specific implementation of LinearEigensystem using Davidson's algorithm with modifications to manage near linear dependencies, and consequent numerical noise, in candidate expansion vectors. More... | |
| struct | LinearEigensystemRSPTOptions |
| Allows setting and getting of options for LinearEigensystemRSPT instance via IterativeSolver base class. More... | |
| class | LinearEquations |
| class | LinearEquationsDavidson |
| Solves a system of linear equation, A x = b. More... | |
| struct | LinearEquationsDavidsonOptions |
| Allows setting and getting of options for LinearEquationsDavidson instance via IterativeSolver base class. More... | |
| struct | LinearEquationsOptions |
| class | Logger |
| class | NonLinearEquations |
| Solves non-linear system of equations using methods such as DIIS. More... | |
| class | NonLinearEquationsDIIS |
| A class that optimises a function using a Quasi-Newton or other method. More... | |
| struct | NonLinearEquationsDIISOptions |
| Allows setting and getting of options for NonLinearEquationsDIIS instance via IterativeSolver base class. More... | |
| struct | NonLinearEquationsOptions |
| class | Optimize |
| class | OptimizeBFGS |
| A class that optimises a function using a Quasi-Newton or other method. More... | |
| struct | OptimizeBFGSOptions |
| Allows setting and getting of options for OptimizeBFGS instance via IterativeSolver base class. More... | |
| struct | OptimizeOptions |
| class | OptimizeSD |
| A class that optimises a function using a simple steepest-descent method. More... | |
| struct | OptimizeSDOptions |
| Allows setting and getting of options for OptimizeBFGS instance via IterativeSolver base class. More... | |
| struct | Options |
| Access point for different options in iterative solvers. More... | |
| class | Problem |
| Abstract class defining the problem-specific interface for the simplified solver interface to IterativeSolver. More... | |
| class | SolverFactory |
| Factory for creating instances of specific solver implementations from the corresponding Options object. More... | |
| struct | Statistics |
| Information about performance of IterativeSolver instance. More... | |
| struct | SVD |
| Stores a singular value and corresponding left and right singular vectors. More... | |
Typedefs | |
| using | options_map = std::map< std::string, std::string > |
| template<class A > | |
| using | VecRef = std::vector< std::reference_wrapper< A > > |
| template<class A > | |
| using | CVecRef = std::vector< std::reference_wrapper< const A > > |
| template<class T > | |
| using | decay_t = typename decay< T >::type |
| using | Interpolate = Interpolator< double > |
| The double-precision interpolant. | |
Enumerations | |
| enum class | Verbosity { None = 0 , Summary = 1 , Iteration = 2 , Detailed = 3 } |
Specifies how much detail IterativeSolver::solve should write to output. More... | |
Functions | |
| int | eigensolver_lapacke_dsyev (std::span< const double > matrix, std::span< double > eigenvectors, std::span< double > eigenvalues, const size_t dimension) |
| Eigen-decomposition of a real symmetric matrix in double precision. | |
| std::list< SVD< double > > | eigensolver_lapacke_dsyev (size_t dimension, std::span< const double > matrix) |
| Eigen-decomposition of a real symmetric matrix in double precision. | |
| template<typename value_type > | |
| size_t | get_rank (std::span< const value_type > eigenvalues, value_type threshold) |
| template<typename value_type > | |
| size_t | get_rank (std::list< SVD< value_type > > svd_system, real_type_t< value_type > threshold) |
| template<typename value_type > | |
| size_t | get_rank (const std::vector< value_type > &eigenvalues, value_type threshold) |
| template<typename value_type , typename std::enable_if_t<!is_complex< value_type >{}, std::nullptr_t > = nullptr> | |
| std::list< SVD< value_type > > | svd_system (size_t nrows, size_t ncols, const array::Span< value_type > &m, real_type_t< value_type > threshold, bool hermitian=false, bool reduce_to_rank=false) |
| Performs singular value decomposition and returns SVD objects for singular values less than threshold, sorted in ascending order. | |
| template<typename value_type > | |
| void | printMatrix (const std::vector< value_type > &, size_t rows, size_t cols, std::string title="", std::ostream &s=molpro::cout) |
| template<typename value_type , typename std::enable_if_t< is_complex< value_type >{}, int > = 0> | |
| void | eigenproblem (std::vector< value_type > &eigenvectors, std::vector< value_type > &eigenvalues, const std::vector< value_type > &matrix, const std::vector< value_type > &metric, size_t dimension, bool hermitian, real_type_t< value_type > svdThreshold, int verbosity, std::vector< std::pair< std::size_t, value_type > > *imag_eval_parts=nullptr, size_t nroots=std::numeric_limits< size_t >::max()) |
| template<typename value_type , typename std::enable_if_t< is_complex< value_type >{}, int > = 0> | |
| void | solve_LinearEquations (std::vector< value_type > &solution, std::vector< value_type > &eigenvalues, const std::vector< value_type > &matrix, const std::vector< value_type > &metric, const std::vector< value_type > &rhs, size_t dimension, size_t nroot, real_type_t< value_type > augmented_hessian, real_type_t< value_type > svdThreshold, int verbosity) |
| template<typename value_type , typename std::enable_if_t< is_complex< value_type >{}, int > = 0> | |
| void | solve_DIIS (std::vector< value_type > &solution, const std::vector< value_type > &matrix, size_t dimension, real_type_t< value_type > svdThreshold, int verbosity=0) |
| template void | printMatrix< double > (const std::vector< double > &, size_t rows, size_t cols, std::string title, std::ostream &s) |
| template size_t | get_rank< double > (std::span< const double > eigenvalues, double threshold) |
| template std::list< SVD< double > > | svd_system (size_t nrows, size_t ncols, const array::Span< double > &m, double threshold, bool hermitian, bool reduce_to_rank) |
| template void | eigenproblem< double > (std::vector< double > &eigenvectors, std::vector< double > &eigenvalues, const std::vector< double > &matrix, const std::vector< double > &metric, const size_t dimension, bool hermitian, double svdThreshold, int verbosity, std::vector< std::pair< std::size_t, double > > *imag_eval_parts, size_t nroots) |
| template void | solve_LinearEquations< double > (std::vector< double > &solution, std::vector< double > &eigenvalues, const std::vector< double > &matrix, const std::vector< double > &metric, const std::vector< double > &rhs, size_t dimension, size_t nroot, double augmented_hessian, double svdThreshold, int verbosity) |
| template void | solve_DIIS< double > (std::vector< double > &solution, const std::vector< double > &matrix, const size_t dimension, double svdThreshold, int verbosity) |
| template void | printMatrix< long double > (const std::vector< long double > &, size_t rows, size_t cols, std::string title, std::ostream &s) |
| template size_t | get_rank< long double > (std::span< const long double > eigenvalues, long double threshold) |
| template std::list< SVD< long double > > | svd_system (size_t nrows, size_t ncols, const array::Span< long double > &m, long double threshold, bool hermitian, bool reduce_to_rank) |
| template void | eigenproblem< long double > (std::vector< long double > &eigenvectors, std::vector< long double > &eigenvalues, const std::vector< long double > &matrix, const std::vector< long double > &metric, const size_t dimension, bool hermitian, long double svdThreshold, int verbosity, std::vector< std::pair< std::size_t, long double > > *imag_eval_parts, size_t nroots) |
| template void | solve_LinearEquations< long double > (std::vector< long double > &solution, std::vector< long double > &eigenvalues, const std::vector< long double > &matrix, const std::vector< long double > &metric, const std::vector< long double > &rhs, size_t dimension, size_t nroot, long double augmented_hessian, long double svdThreshold, int verbosity) |
| template void | solve_DIIS< long double > (std::vector< long double > &solution, const std::vector< long double > &matrix, const size_t dimension, long double svdThreshold, int verbosity) |
| template void | printMatrix< std::complex< double > > (const std::vector< std::complex< double > > &, size_t rows, size_t cols, std::string title, std::ostream &s) |
| template std::list< SVD< std::complex< double > > > | svd_system (size_t nrows, size_t ncols, const array::Span< std::complex< double > > &m, double threshold, bool hermitian, bool reduce_to_rank) |
| template void | eigenproblem< std::complex< double > > (std::vector< std::complex< double > > &eigenvectors, std::vector< std::complex< double > > &eigenvalues, const std::vector< std::complex< double > > &matrix, const std::vector< std::complex< double > > &metric, const size_t dimension, bool hermitian, double svdThreshold, int verbosity, std::vector< std::pair< std::size_t, std::complex< double > > > *imag_eval_parts, size_t nroots) |
| template void | solve_LinearEquations< std::complex< double > > (std::vector< std::complex< double > > &solution, std::vector< std::complex< double > > &eigenvalues, const std::vector< std::complex< double > > &matrix, const std::vector< std::complex< double > > &metric, const std::vector< std::complex< double > > &rhs, size_t dimension, size_t nroot, double augmented_hessian, double svdThreshold, int verbosity) |
| template void | solve_DIIS< std::complex< double > > (std::vector< std::complex< double > > &solution, const std::vector< std::complex< double > > &matrix, const size_t dimension, double svdThreshold, int verbosity) |
| template<typename value_type > | |
| int | eigensolver_hermitian_lowest (std::span< const value_type > matrix, std::span< value_type > eigenvectors, std::span< real_type_t< value_type > > eigenvalues, const size_t dimension, const size_t nroots) |
The lowest nroots eigenpairs of a real symmetric / complex hermitian matrix. | |
| template<typename value_type > | |
| bool | eigenvalues_certainly_above (std::span< const value_type > matrix, size_t dimension, real_type_t< value_type > threshold, real_type_t< value_type > margin=1e4) |
Whether every eigenvalue of a hermitian matrix certainly exceeds threshold, established without its eigendecomposition. | |
| template<typename value_type > | |
| bool | generalized_eigensolver_hermitian_lowest (std::span< const value_type > matrix, std::span< const value_type > metric, std::span< value_type > eigenvectors, std::span< real_type_t< value_type > > eigenvalues, size_t dimension, size_t nroots, real_type_t< value_type > min_rcond) |
The lowest nroots eigenpairs of the generalized hermitian problem H c = S c e, for a metric S that is safely positive definite, by Cholesky reduction (?sygvx/?hegvx). | |
| template<typename value_type > | |
| int | eigensolver_hermitian (std::span< const value_type > matrix, std::span< value_type > eigenvectors, std::span< real_type_t< value_type > > eigenvalues, const size_t dimension) |
| Eigen-decomposition of a real symmetric / complex hermitian matrix. | |
| template<typename value_type > | |
| std::list< SVD< value_type > > | eigensolver_hermitian (size_t dimension, std::span< const value_type > matrix) |
| Eigen-decomposition of a real symmetric / complex hermitian matrix,. | |
| template<typename value_type > | |
| std::list< SVD< value_type > > | svd_eigen_jacobi (size_t nrows, size_t ncols, const array::Span< value_type > &m, real_type_t< value_type > threshold) |
| template<typename value_type > | |
| std::list< SVD< value_type > > | svd_eigen_bdcsvd (size_t nrows, size_t ncols, const array::Span< value_type > &m, real_type_t< value_type > threshold) |
| template<typename R , typename Q , typename P > | |
| void | read_handler_counts (std::shared_ptr< Statistics > stats, std::shared_ptr< ArrayHandlers< R, Q, P > > handlers) |
| std::ostream & | operator<< (std::ostream &o, const Statistics &statistics) |
| template<class ForwardIt > | |
| auto | wrap (ForwardIt begin, ForwardIt end) |
| Takes a begin and end iterators and returns a vector of references to each element. | |
| template<class ForwardIt > | |
| auto | const_cast_wrap (ForwardIt begin, ForwardIt end) |
| Takes a begin and end iterators and returns a vector of const-casted references to each element. | |
| template<class ForwardIt > | |
| auto | cwrap (ForwardIt begin, ForwardIt end) |
| Takes a begin and end iterators and returns a vector of references to each element. | |
| template<class IterableContainer > | |
| auto | wrap (const IterableContainer ¶meters) |
| Wraps references for each parameter in an iterable container that implements begin()/end() | |
| template<class IterableContainer > | |
| auto | wrap (IterableContainer ¶meters) |
| Wraps references for each parameter in an iterable container that implements begin()/end() | |
| template<class IterableContainer > | |
| auto | const_cast_wrap (IterableContainer ¶meters) |
| Wraps const-casted references for each parameter in an iterable container that implements begin()/end() | |
| template<class IterableContainer > | |
| auto | cwrap (IterableContainer ¶meters) |
| Wraps references for each parameter in an iterable container that implements begin()/end() | |
| template<typename T , typename... S> | |
| auto | wrap_arg (T &&arg, S &&... args) -> std::enable_if_t< std::conjunction_v< std::is_same< decay_t< T >, decay_t< S > >... >, VecRef< decay_t< T > > > |
| Constructs a vector of reference wrappers with provided arguments. | |
| template<typename T , typename... S> | |
| auto | cwrap_arg (T &&arg, S &&... args) -> std::enable_if_t< std::conjunction_v< std::is_same< decay_t< T >, decay_t< S > >... >, CVecRef< decay_t< T > > > |
| Constructs a vector of const reference wrappers with provided arguments. | |
| template<typename R , typename ForwardIt > | |
| std::vector< size_t > | find_ref (const VecRef< R > &wparams, ForwardIt begin, ForwardIt end) |
| Given wrapped references in wparams and a range of original parameters [begin, end), returns indices of parameters that are wrapped in this range. | |
| template<typename R > | |
| std::vector< size_t > | find_ref (const CVecRef< R > &wparams, const CVecRef< R > &wparams_ref) |
| Given two wrapped references returns indices of parameters that are in both sets. | |
| template<typename T , typename U > | |
| auto | remove_elements (std::vector< T > params, const std::vector< U > &indices) |
| Removes indices from a vector. | |
| template<typename T , typename S , typename = std::enable_if_t<std::is_base_of<molpro::linalg::array::DistrArray, T>::value>> | |
| void | precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals) |
| template<class T , typename S > | |
| void | precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals, typename T::iterator *=nullptr) |
| template<typename T , typename S , typename = std::enable_if_t<!std::is_base_of<molpro::linalg::array::DistrArray, T>::value>, class = void> | |
| void | precondition_default (const VecRef< T > &action, const std::vector< S > &shift, const T &diagonals, typename std::enable_if<!has_iterator< T >::value, void * >::type=nullptr) |
| template<typename value_type > | |
| bool | operator== (const typename Interpolator< value_type >::point &lhs, const typename Interpolator< value_type >::point &rhs) |
| bool | operator== (const Interpolate::point &lhs, const Interpolate::point &rhs) |
| template<typename value_type > | |
| std::ostream & | operator<< (std::ostream &os, const Interpolator< value_type > &interpolant) |
| template<typename value_type > | |
| std::ostream & | operator<< (std::ostream &os, const typename Interpolator< value_type >::point &p) |
| std::ostream & | operator<< (std::ostream &os, const Interpolate::point &p) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< LinearEigensystem< R, Q, P > > | create_LinearEigensystem (const LinearEigensystemOptions &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< LinearEigensystem< R, Q, P > > | create_LinearEigensystem (const std::string &method="Davidson", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< LinearEquations< R, Q, P > > | create_LinearEquations (const LinearEquationsOptions &options, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< LinearEquations< R, Q, P > > | create_LinearEquations (const std::string &method="Davidson", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::tuple< bool, std::unique_ptr< LinearEquations< R, Q, P > > > | Solve_LinearEquations (const VecRef< R > ¶meters, const VecRef< R > &actions, const Problem< R > &problem, int verbosity=0, bool generate_initial_guess=true, const std::string &method="Davidson", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::tuple< bool, std::unique_ptr< LinearEquations< R, Q, P > > > | Solve_LinearEquations (std::vector< R > ¶meters, std::vector< R > &actions, const Problem< R > &problem, int verbosity=0, bool generate_initial_guess=true, const std::string &method="Davidson", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| auto | Solve_LinearEquations (R ¶meters, R &actions, const Problem< R > &problem, int verbosity=0, bool generate_initial_guess=true, const std::string &method="Davidson", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< NonLinearEquations< R, Q, P > > | create_NonLinearEquations (const NonLinearEquationsOptions &options=NonLinearEquationsOptions{}, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< NonLinearEquations< R, Q, P > > | create_NonLinearEquations (const std::string &method="DIIS", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< Optimize< R, Q, P > > | create_Optimize (const OptimizeOptions &options=OptimizeOptions{}, const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template<class R , class Q = R, class P = std::map<size_t, typename R::value_type>> | |
| std::unique_ptr< Optimize< R, Q, P > > | create_Optimize (const std::string &method="BFGS", const std::string &options="", const std::shared_ptr< ArrayHandlers< R, Q, P > > &handlers=std::make_shared< molpro::linalg::itsolv::ArrayHandlers< R, Q, P > >()) |
| template void | printMatrix< value_type > (const std::vector< value_type > &, size_t rows, size_t cols, std::string title, std::ostream &s) |
| template size_t | get_rank< value_type > (std::span< const value_type > eigenvalues, value_type threshold) |
| template std::list< SVD< value_type > > | svd_system< value_type > (size_t nrows, size_t ncols, const array::Span< value_type > &m, real_type_t< value_type > threshold, bool hermitian, bool reduce_to_rank) |
| template void | eigenproblem< value_type > (std::vector< value_type > &eigenvectors, std::vector< value_type > &eigenvalues, const std::vector< value_type > &matrix, const std::vector< value_type > &metric, size_t dimension, bool hermitian, real_type_t< value_type > svdThreshold, int verbosity, std::vector< std::pair< std::size_t, value_type > > *imag_eval_parts, size_t nroots) |
| template void | solve_LinearEquations< value_type > (std::vector< value_type > &solution, std::vector< value_type > &eigenvalues, const std::vector< value_type > &matrix, const std::vector< value_type > &metric, const std::vector< value_type > &rhs, size_t dimension, size_t nroot, real_type_t< value_type > augmented_hessian, real_type_t< value_type > svdThreshold, int verbosity) |
| template void | solve_DIIS< value_type > (std::vector< value_type > &solution, const std::vector< value_type > &matrix, size_t dimension, real_type_t< value_type > svdThreshold, int verbosity) |
| template size_t | get_rank< real_type_t< value_type > > (std::span< const real_type_t< value_type > > eigenvalues, real_type_t< value_type > threshold) |
Variables | |
| template<typename T > | |
| constexpr bool | has_lapack_kernel_v = has_lapack_kernel<T>::value |
4-parameter interpolation of a 1-dimensional function given two points for which function values and first derivatives are known.
| using molpro::linalg::itsolv::CVecRef = typedef std::vector<std::reference_wrapper<const A> > |
The double-precision interpolant.
| using molpro::linalg::itsolv::options_map = typedef std::map<std::string, std::string> |
| using molpro::linalg::itsolv::VecRef = typedef std::vector<std::reference_wrapper<A> > |
Specifies how much detail IterativeSolver::solve should write to output.
| Enumerator | |
|---|---|
| None | no output |
| Summary | only summary at the start and end of solve |
| Iteration | Summary plus minimal results at each iteration. |
| Detailed | Iteration plus more detail such as operation count. |
Takes a begin and end iterators and returns a vector of const-casted references to each element.
| auto molpro::linalg::itsolv::const_cast_wrap | ( | IterableContainer & | parameters | ) |
Wraps const-casted references for each parameter in an iterable container that implements begin()/end()
| IterableContainer | should have begin()/end() either as free or member functions |
| R | element type |
| parameters | parameters to wrap |
| std::unique_ptr< LinearEigensystem< R, Q, P > > molpro::linalg::itsolv::create_LinearEigensystem | ( | const LinearEigensystemOptions & | options, |
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< LinearEigensystem< R, Q, P > > molpro::linalg::itsolv::create_LinearEigensystem | ( | const std::string & | method = "Davidson", |
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< LinearEquations< R, Q, P > > molpro::linalg::itsolv::create_LinearEquations | ( | const LinearEquationsOptions & | options, |
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< LinearEquations< R, Q, P > > molpro::linalg::itsolv::create_LinearEquations | ( | const std::string & | method = "Davidson", |
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< NonLinearEquations< R, Q, P > > molpro::linalg::itsolv::create_NonLinearEquations | ( | const NonLinearEquationsOptions & | options = NonLinearEquationsOptions{}, |
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< NonLinearEquations< R, Q, P > > molpro::linalg::itsolv::create_NonLinearEquations | ( | const std::string & | method = "DIIS", |
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< Optimize< R, Q, P > > molpro::linalg::itsolv::create_Optimize | ( | const OptimizeOptions & | options = OptimizeOptions{}, |
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::unique_ptr< Optimize< R, Q, P > > molpro::linalg::itsolv::create_Optimize | ( | const std::string & | method = "BFGS", |
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
Takes a begin and end iterators and returns a vector of references to each element.
| auto molpro::linalg::itsolv::cwrap | ( | IterableContainer & | parameters | ) |
Wraps references for each parameter in an iterable container that implements begin()/end()
| IterableContainer | should have begin()/end() either as free or member functions |
| R | element type |
| parameters | parameters to wrap |
| auto molpro::linalg::itsolv::cwrap_arg | ( | T && | arg, |
| S &&... | args | ||
| ) | -> std::enable_if_t<std::conjunction_v<std::is_same<decay_t<T>, decay_t<S>>...>, CVecRef<decay_t<T>>> |
Constructs a vector of const reference wrappers with provided arguments.
| void molpro::linalg::itsolv::eigenproblem | ( | std::vector< value_type > & | eigenvectors, |
| std::vector< value_type > & | eigenvalues, | ||
| const std::vector< value_type > & | matrix, | ||
| const std::vector< value_type > & | metric, | ||
| size_t | dimension, | ||
| bool | hermitian, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity, | ||
| std::vector< std::pair< std::size_t, value_type > > * | imag_eval_parts = nullptr, |
||
| size_t | nroots = std::numeric_limits<size_t>::max() |
||
| ) |
| imag_eval_parts | if not null, receives a (root, imaginary part) record for every eigenvalue that is a member of a complex conjugate pair. The members of a pair are adjacent roots and their records are consecutive, first member first. Their eigenvalues are set to the common real part and their eigenvectors to the real and imaginary part of the first member's complex eigenvector. |
|
extern |
|
extern |
|
extern |
| template void molpro::linalg::itsolv::eigenproblem< value_type > | ( | std::vector< value_type > & | eigenvectors, |
| std::vector< value_type > & | eigenvalues, | ||
| const std::vector< value_type > & | matrix, | ||
| const std::vector< value_type > & | metric, | ||
| size_t | dimension, | ||
| bool | hermitian, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity, | ||
| std::vector< std::pair< std::size_t, value_type > > * | imag_eval_parts, | ||
| size_t | nroots | ||
| ) |
| std::list< SVD< value_type > > molpro::linalg::itsolv::eigensolver_hermitian | ( | size_t | dimension, |
| std::span< const value_type > | matrix | ||
| ) |
Eigen-decomposition of a real symmetric / complex hermitian matrix,.
| [in] | dimension | length of one axis of the matrix. |
| [in] | matrix | the input matrix (will not be altered). Must be square, dimension*dimension elements long. |
| int molpro::linalg::itsolv::eigensolver_hermitian | ( | std::span< const value_type > | matrix, |
| std::span< value_type > | eigenvectors, | ||
| std::span< real_type_t< value_type > > | eigenvalues, | ||
| const size_t | dimension | ||
| ) |
Eigen-decomposition of a real symmetric / complex hermitian matrix.
Dispatches to ?syevd/?heevd for the scalar types LAPACK covers and to Eigen::SelfAdjointEigenSolver for every other precision; both branches produce the same layout and ordering.
| [in] | matrix | the input matrix (will not be altered). Must be square, dimension*dimension elements long. Only the lower triangle in column-major order is referenced. |
| [out] | eigenvectors | the eigenvectors as the columns of a column-major matrix, i.e. eigenvector i occupies elements [i*dimension, (i+1)*dimension). Same size as matrix. |
| [out] | eigenvalues | the eigenvalues in ascending order. Must be dimension elements long. |
| [in] | dimension | length of one axis of the matrix. |
| int molpro::linalg::itsolv::eigensolver_hermitian_lowest | ( | std::span< const value_type > | matrix, |
| std::span< value_type > | eigenvectors, | ||
| std::span< real_type_t< value_type > > | eigenvalues, | ||
| const size_t | dimension, | ||
| const size_t | nroots | ||
| ) |
The lowest nroots eigenpairs of a real symmetric / complex hermitian matrix.
Dispatches like eigensolver_hermitian(), to ?syevr/?heevr where LAPACK covers the scalar type, which reduces the matrix to tridiagonal form as the full decomposition does but then computes and back-transforms only the wanted eigenvectors.
| [in] | matrix | the input matrix (will not be altered), dimension*dimension elements, column-major. Only the lower triangle is referenced. |
| [out] | eigenvectors | the eigenvectors as the columns of a column-major dimension x nroots matrix. |
| [out] | eigenvalues | the lowest nroots eigenvalues in ascending order. |
| [in] | dimension | length of one axis of the matrix. |
| [in] | nroots | how many of the lowest eigenpairs to compute, at most dimension. |
|
inline |
Eigen-decomposition of a real symmetric matrix in double precision.
Retained for backwards compatibility; equivalent to eigensolver_hermitian<double>(), which is the precision-generic entry point. Note that despite the name the decomposition is only carried out by LAPACK when this build found an interface to it.
Retained for backwards compatibility; a thin forwarder to the precision-generic eigensolver_hermitian(), which dispatches to LAPACK or to Eigen depending on the scalar type and on what this build found.
|
inline |
Eigen-decomposition of a real symmetric matrix in double precision.
Retained for backwards compatibility; equivalent to eigensolver_hermitian<double>(), which is the precision-generic entry point. Note that despite the name the decomposition is only carried out by LAPACK when this build found an interface to it.
Retained for backwards compatibility; a thin forwarder to the precision-generic eigensolver_hermitian(), which dispatches to LAPACK or to Eigen depending on the scalar type and on what this build found.
| bool molpro::linalg::itsolv::eigenvalues_certainly_above | ( | std::span< const value_type > | matrix, |
| size_t | dimension, | ||
| real_type_t< value_type > | threshold, | ||
| real_type_t< value_type > | margin = 1e4 |
||
| ) |
Whether every eigenvalue of a hermitian matrix certainly exceeds threshold, established without its eigendecomposition.
The matrix must factorise by Cholesky, and the estimate of its smallest eigenvalue from the factor, 1/||A^-1||_1 with ||A^-1||_1 estimated by ?pocon, must exceed the threshold by a factor of margin. 1/||A^-1||_1 bounds the smallest eigenvalue from below; the estimate of ||A^-1||_1 can fall short of it, but only by a modest factor, which the margin absorbs. Only the scalar types LAPACK covers are decided; for the others this returns false.
| [in] | matrix | the matrix, column-major, dimension*dimension elements; only the lower triangle is referenced |
| std::vector< size_t > molpro::linalg::itsolv::find_ref | ( | const CVecRef< R > & | wparams, |
| const CVecRef< R > & | wparams_ref | ||
| ) |
Given two wrapped references returns indices of parameters that are in both sets.
| wparams | first set of references |
| wparams_ref | second set of references |
| std::vector< size_t > molpro::linalg::itsolv::find_ref | ( | const VecRef< R > & | wparams, |
| ForwardIt | begin, | ||
| ForwardIt | end | ||
| ) |
Given wrapped references in wparams and a range of original parameters [begin, end), returns indices of parameters that are wrapped in this range.
| wparams | wrapped references to subset of params |
| begin | start of range of original paramaters |
| end | end of range of original paramaters |
| bool molpro::linalg::itsolv::generalized_eigensolver_hermitian_lowest | ( | std::span< const value_type > | matrix, |
| std::span< const value_type > | metric, | ||
| std::span< value_type > | eigenvectors, | ||
| std::span< real_type_t< value_type > > | eigenvalues, | ||
| size_t | dimension, | ||
| size_t | nroots, | ||
| real_type_t< value_type > | min_rcond | ||
| ) |
The lowest nroots eigenpairs of the generalized hermitian problem H c = S c e, for a metric S that is safely positive definite, by Cholesky reduction (?sygvx/?hegvx).
Only the scalar types LAPACK covers take this route; for the others, and whenever S is not safely positive definite – its Cholesky factorisation fails, or the estimated reciprocal 1-norm condition number of S falls below min_rcond – this returns false and the caller falls back on reducing S by its eigendecomposition.
| [in] | matrix | H, column-major, dimension*dimension elements; only the lower triangle is referenced |
| [in] | metric | S, column-major, dimension*dimension elements; only the lower triangle is referenced |
| [out] | eigenvectors | the eigenvectors, S-orthonormal, as the columns of a column-major dimension x nroots matrix |
| [out] | eigenvalues | the lowest nroots eigenvalues in ascending order |
| size_t molpro::linalg::itsolv::get_rank | ( | const std::vector< value_type > & | eigenvalues, |
| value_type | threshold | ||
| ) |
Get the rank of some matrix, given a threshold.
| [in] | eigenvalues | the matrix, as a vector. |
| [in] | threshold | the threshold. Note that this is the normalised threshold, a value between 0 and 1, relative to the largest element in the matrix. |
| size_t molpro::linalg::itsolv::get_rank | ( | std::list< SVD< value_type > > | svd_system, |
| real_type_t< value_type > | threshold | ||
| ) |
Get the rank of some matrix, given a threshold.
| [in] | svd_system | a std::list containing SVD objects, such as those created by itsolv::svd_system |
| [in] | threshold | the threshold. Note that this is the normalised threshold, a value between 0 and 1, relative to the largest element in the matrix. |
| size_t molpro::linalg::itsolv::get_rank | ( | std::span< const value_type > | eigenvalues, |
| value_type | threshold | ||
| ) |
Get the rank of some matrix, given a threshold.
| [in] | eigenvalues | the matrix, as a vector. |
| [in] | threshold | the threshold. Note that this is the normalised threshold, a value between 0 and 1, relative to the largest element in the matrix. |
|
extern |
|
extern |
| template size_t molpro::linalg::itsolv::get_rank< real_type_t< value_type > > | ( | std::span< const real_type_t< value_type > > | eigenvalues, |
| real_type_t< value_type > | threshold | ||
| ) |
| template size_t molpro::linalg::itsolv::get_rank< value_type > | ( | std::span< const value_type > | eigenvalues, |
| value_type | threshold | ||
| ) |
|
inline |
|
inline |
| std::ostream & molpro::linalg::itsolv::operator<< | ( | std::ostream & | os, |
| const Interpolator< value_type > & | interpolant | ||
| ) |
| std::ostream & molpro::linalg::itsolv::operator<< | ( | std::ostream & | os, |
| const typename Interpolator< value_type >::point & | p | ||
| ) |
|
inline |
| bool molpro::linalg::itsolv::operator== | ( | const typename Interpolator< value_type >::point & | lhs, |
| const typename Interpolator< value_type >::point & | rhs | ||
| ) |
| void molpro::linalg::itsolv::precondition_default | ( | const VecRef< T > & | action, |
| const std::vector< S > & | shift, | ||
| const T & | diagonals | ||
| ) |
| void molpro::linalg::itsolv::precondition_default | ( | const VecRef< T > & | action, |
| const std::vector< S > & | shift, | ||
| const T & | diagonals, | ||
| typename std::enable_if<!has_iterator< T >::value, void * >::type | = nullptr |
||
| ) |
| void molpro::linalg::itsolv::precondition_default | ( | const VecRef< T > & | action, |
| const std::vector< S > & | shift, | ||
| const T & | diagonals, | ||
| typename T::iterator * | = nullptr |
||
| ) |
| void molpro::linalg::itsolv::printMatrix | ( | const std::vector< value_type > & | m, |
| size_t | rows, | ||
| size_t | cols, | ||
| std::string | title = "", |
||
| std::ostream & | s = molpro::cout |
||
| ) |
|
extern |
|
extern |
|
extern |
| template void molpro::linalg::itsolv::printMatrix< value_type > | ( | const std::vector< value_type > & | , |
| size_t | rows, | ||
| size_t | cols, | ||
| std::string | title, | ||
| std::ostream & | s | ||
| ) |
| void molpro::linalg::itsolv::read_handler_counts | ( | std::shared_ptr< Statistics > | stats, |
| std::shared_ptr< ArrayHandlers< R, Q, P > > | handlers | ||
| ) |
| auto molpro::linalg::itsolv::remove_elements | ( | std::vector< T > | params, |
| const std::vector< U > & | indices | ||
| ) |
Removes indices from a vector.
| T | value type |
| I | index type |
| params | container |
| indices | indices to remove |
| void molpro::linalg::itsolv::solve_DIIS | ( | std::vector< value_type > & | solution, |
| const std::vector< value_type > & | matrix, | ||
| size_t | dimension, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity = 0 |
||
| ) |
|
extern |
|
extern |
|
extern |
| template void molpro::linalg::itsolv::solve_DIIS< value_type > | ( | std::vector< value_type > & | solution, |
| const std::vector< value_type > & | matrix, | ||
| size_t | dimension, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity | ||
| ) |
| std::tuple< bool, std::unique_ptr< LinearEquations< R, Q, P > > > molpro::linalg::itsolv::Solve_LinearEquations | ( | const VecRef< R > & | parameters, |
| const VecRef< R > & | actions, | ||
| const Problem< R > & | problem, | ||
| int | verbosity = 0, |
||
| bool | generate_initial_guess = true, |
||
| const std::string & | method = "Davidson", |
||
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| auto molpro::linalg::itsolv::Solve_LinearEquations | ( | R & | parameters, |
| R & | actions, | ||
| const Problem< R > & | problem, | ||
| int | verbosity = 0, |
||
| bool | generate_initial_guess = true, |
||
| const std::string & | method = "Davidson", |
||
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| std::tuple< bool, std::unique_ptr< LinearEquations< R, Q, P > > > molpro::linalg::itsolv::Solve_LinearEquations | ( | std::vector< R > & | parameters, |
| std::vector< R > & | actions, | ||
| const Problem< R > & | problem, | ||
| int | verbosity = 0, |
||
| bool | generate_initial_guess = true, |
||
| const std::string & | method = "Davidson", |
||
| const std::string & | options = "", |
||
| const std::shared_ptr< ArrayHandlers< R, Q, P > > & | handlers = std::make_shared<molpro::linalg::itsolv::ArrayHandlers<R, Q, P>>() |
||
| ) |
| void molpro::linalg::itsolv::solve_LinearEquations | ( | std::vector< value_type > & | solution, |
| std::vector< value_type > & | eigenvalues, | ||
| const std::vector< value_type > & | matrix, | ||
| const std::vector< value_type > & | metric, | ||
| const std::vector< value_type > & | rhs, | ||
| size_t | dimension, | ||
| size_t | nroot, | ||
| real_type_t< value_type > | augmented_hessian, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity | ||
| ) |
|
extern |
|
extern |
|
extern |
| template void molpro::linalg::itsolv::solve_LinearEquations< value_type > | ( | std::vector< value_type > & | solution, |
| std::vector< value_type > & | eigenvalues, | ||
| const std::vector< value_type > & | matrix, | ||
| const std::vector< value_type > & | metric, | ||
| const std::vector< value_type > & | rhs, | ||
| size_t | dimension, | ||
| size_t | nroot, | ||
| real_type_t< value_type > | augmented_hessian, | ||
| real_type_t< value_type > | svdThreshold, | ||
| int | verbosity | ||
| ) |
| std::list< SVD< value_type > > molpro::linalg::itsolv::svd_eigen_bdcsvd | ( | size_t | nrows, |
| size_t | ncols, | ||
| const array::Span< value_type > & | m, | ||
| real_type_t< value_type > | threshold | ||
| ) |
| std::list< SVD< value_type > > molpro::linalg::itsolv::svd_eigen_jacobi | ( | size_t | nrows, |
| size_t | ncols, | ||
| const array::Span< value_type > & | m, | ||
| real_type_t< value_type > | threshold | ||
| ) |
|
extern |
|
extern |
|
extern |
| std::list< SVD< value_type > > molpro::linalg::itsolv::svd_system | ( | size_t | nrows, |
| size_t | ncols, | ||
| const array::Span< value_type > & | m, | ||
| real_type_t< value_type > | threshold, | ||
| bool | hermitian = false, |
||
| bool | reduce_to_rank = false |
||
| ) |
Performs singular value decomposition and returns SVD objects for singular values less than threshold, sorted in ascending order.
| value_type |
| nrows | number of rows in the matrix |
| ncols | number of columns in the matrix |
| m | row-wise data buffer for a matrix |
| threshold | singular values less than threshold will be returned |
| template std::list< SVD< value_type > > molpro::linalg::itsolv::svd_system< value_type > | ( | size_t | nrows, |
| size_t | ncols, | ||
| const array::Span< value_type > & | m, | ||
| real_type_t< value_type > | threshold, | ||
| bool | hermitian, | ||
| bool | reduce_to_rank | ||
| ) |
| auto molpro::linalg::itsolv::wrap | ( | const IterableContainer & | parameters | ) |
Wraps references for each parameter in an iterable container that implements begin()/end()
| IterableContainer | should have begin()/end() either as free or member functions |
| R | element type |
| parameters | parameters to wrap |
Takes a begin and end iterators and returns a vector of references to each element.
| auto molpro::linalg::itsolv::wrap | ( | IterableContainer & | parameters | ) |
Wraps references for each parameter in an iterable container that implements begin()/end()
| IterableContainer | should have begin()/end() either as free or member functions |
| R | element type |
| parameters | parameters to wrap |
| auto molpro::linalg::itsolv::wrap_arg | ( | T && | arg, |
| S &&... | args | ||
| ) | -> std::enable_if_t<std::conjunction_v<std::is_same<decay_t<T>, decay_t<S>>...>, VecRef<decay_t<T>>> |
Constructs a vector of reference wrappers with provided arguments.