comment corrections
This commit is contained in:
1 parent
9be1578b8f
commit
176562f088
6 files changed
+11
-6
No files matched your search
+1
-1
@@ -42,7 +42,7 @@ namespace LA {
|
|||||||
//@@@implement start from larger Krylov space than a single vector - useful for multiroot solutions
|
//@@@implement start from larger Krylov space than a single vector - useful for multiroot solutions
|
||||||
|
|
||||||
|
|
||||||
//Davidson algorithm: J. Comp. Phys. 17:817 (1975)
|
//Davidson algorithm: J. Comput. Phys. 17, 87 (1975)
|
||||||
|
|
||||||
|
|
||||||
template <typename T, typename Matrix>
|
template <typename T, typename Matrix>
|
||||||
|
|||||||
@@ -57,7 +57,7 @@ public:
|
|||||||
~DIIS();
|
~DIIS();
|
||||||
DIIS(const DIIS &) = delete; //owns raw storage, not copyable
|
DIIS(const DIIS &) = delete; //owns raw storage, not copyable
|
||||||
DIIS & operator=(const DIIS &) = delete;
|
DIIS & operator=(const DIIS &) = delete;
|
||||||
typename LA_traits<U>::normtype extrapolate(T &vec, U &errvec, bool verbose=false, const Un diiseps=0, bool errvecout=false); //vec is input/output, errvec optionally too; returns square residual norm
|
typename LA_traits<U>::normtype extrapolate(T &vec, U &errvec, bool verbose=false, const Un diiseps=0, bool errvecout=false); //vec is input/output, errvec optionally too; returns the norm of the input errvec (1 in the first call)
|
||||||
};
|
};
|
||||||
|
|
||||||
template<typename T, typename U>
|
template<typename T, typename U>
|
||||||
|
|||||||
@@ -1402,7 +1402,7 @@ const NRSMat<T> NRMat<T>::timestransposed() const {
|
|||||||
|
|
||||||
/***************************************************************************//**
|
/***************************************************************************//**
|
||||||
* fill given real matrix with random numbers
|
* fill given real matrix with random numbers
|
||||||
* @param[in] x generate random numbers from the interval [0, x]
|
* @param[in] x generate random numbers from the interval [-x, x)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
template<>
|
template<>
|
||||||
void NRMat<double>::randomize(const double &x) {
|
void NRMat<double>::randomize(const double &x) {
|
||||||
@@ -1432,7 +1432,7 @@ void NRMat<double>::randomize(const double &x) {
|
|||||||
/***************************************************************************//**
|
/***************************************************************************//**
|
||||||
* fill given complex matrix with random numbers
|
* fill given complex matrix with random numbers
|
||||||
* real/imaginary components are generated independently
|
* real/imaginary components are generated independently
|
||||||
* @param[in] x generate random numbers from the interval [0, x]
|
* @param[in] x generate random numbers from the interval [-x, x)
|
||||||
******************************************************************************/
|
******************************************************************************/
|
||||||
template<>
|
template<>
|
||||||
void NRMat<std::complex<double> >::randomize(const double &x) {
|
void NRMat<std::complex<double> >::randomize(const double &x) {
|
||||||
|
|||||||
@@ -207,9 +207,9 @@ public:
|
|||||||
//! unary minus
|
//! unary minus
|
||||||
const NRMat operator-() const;
|
const NRMat operator-() const;
|
||||||
|
|
||||||
//! add scalar value to all matrix elements and return the result by value
|
//! add scalar value to the diagonal elements and return the result by value
|
||||||
inline const NRMat operator+(const T &a) const;
|
inline const NRMat operator+(const T &a) const;
|
||||||
//! subtract scalar value from all matrix elements and return the result by value
|
//! subtract scalar value from the diagonal elements and return the result by value
|
||||||
inline const NRMat operator-(const T &a) const;
|
inline const NRMat operator-(const T &a) const;
|
||||||
//! multiply all matrix elements by a scalar value and return the result by value
|
//! multiply all matrix elements by a scalar value and return the result by value
|
||||||
inline const NRMat operator*(const T &a) const;
|
inline const NRMat operator*(const T &a) const;
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
LA: linear algebra C++ interface library
|
LA: linear algebra C++ interface library
|
||||||
Copyright (C) 2026 Jiri Pittner <jiri.pittner@jh-inst.cas.cz> or <jiri@pittnerovi.com>
|
Copyright (C) 2026 Jiri Pittner <jiri.pittner@jh-inst.cas.cz> or <jiri@pittnerovi.com>
|
||||||
|
This code has been prepared with the assistance of an AI (Claude Opus 5.5, Anthropic).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
@@ -2074,6 +2075,9 @@ template class QNG_Optimizer<T>; \
|
|||||||
template class Adam_Optimizer<T>; \
|
template class Adam_Optimizer<T>; \
|
||||||
template class SPSA_Optimizer<T>; \
|
template class SPSA_Optimizer<T>; \
|
||||||
template T linemin_brent(optevaluator<T> &e, NRVec<T> &x, T &f, const NRVec<T> &u, const T t1, const T tol, const T abstol, const int maxiter, const int verbose); \
|
template T linemin_brent(optevaluator<T> &e, NRVec<T> &x, T &f, const NRVec<T> &u, const T t1, const T tol, const T abstol, const int maxiter, const int verbose); \
|
||||||
|
template optresult<T> linesearch_minimize(const char *name, linesearch_direction<T> &dir, const OptProblem<T> *o, NRVec<T> &x, const linesearch_hyperparameters<T> &hp, hyperparameters<T> *achieved); \
|
||||||
|
template optresult<T> firstorder_minimize(const char *name, firstorder_step<T> &stepper, const OptProblem<T> *o, NRVec<T> &x, const firstorder_hyperparameters<T> &hp, hyperparameters<T> *achieved, gradient_estimator<T> *est); \
|
||||||
|
template optresult<T> trustregion_minimize(const char *name, trustregion_step<T> &stepper, const OptProblem<T> *o, NRVec<T> &x, const trustregion_hyperparameters<T> &hp, hyperparameters<T> *achieved); \
|
||||||
|
|
||||||
INSTANTIZE(double)
|
INSTANTIZE(double)
|
||||||
|
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
LA: linear algebra C++ interface library
|
LA: linear algebra C++ interface library
|
||||||
Copyright (C) 2021 Jiri Pittner <jiri.pittner@jh-inst.cas.cz> or <jiri@pittnerovi.com>
|
Copyright (C) 2021 Jiri Pittner <jiri.pittner@jh-inst.cas.cz> or <jiri@pittnerovi.com>
|
||||||
|
This code has been prepared with the assistance of an AI (Claude Opus 5.5, Anthropic).
|
||||||
|
|
||||||
This program is free software: you can redistribute it and/or modify
|
This program is free software: you can redistribute it and/or modify
|
||||||
it under the terms of the GNU General Public License as published by
|
it under the terms of the GNU General Public License as published by
|
||||||
|
|||||||
Reference in new issue
Block a user