58 template <
class HessFun>
63 auto v = [n](
auto &
v) {
return v.topRows(n); };
64 auto z =
v(this->z),
r =
v(this->r),
d =
v(this->d),
Bd =
v(this->Bd);
88 const auto max_iter =
static_cast<index_t>(
117 if (!std::isfinite(
alpha)) {
163 return std::make_tuple(std::fmin(
ta,
tb), std::fmax(
ta,
tb));
#define USING_ALPAQA_CONFIG(Conf)
real_t tol_scale_root
Determines the tolerance for termination of the algorithm.
real_t tol_max
Determines the tolerance for termination of the algorithm.
real_t max_iter_factor
Limit the number of CG iterations to , where is the number of free variables of the problem.
real_t tol_scale
Determines the tolerance for termination of the algorithm.
Parameters for SteihaugCG.
typename Conf::real_t real_t
typename Conf::index_t index_t
typename Conf::length_t length_t
typename Conf::crvec crvec
Steihaug conjugate gradients procedure based on https://github.com/scipy/scipy/blob/583e70a50573169fc...
SteihaugCG(const Params ¶ms)
real_t solve(const auto &grad, const HessFun &hess_prod, real_t trust_radius, rvec step) const
static auto get_boundaries_intersections(crvec z, crvec d, real_t trust_radius)
Solve the scalar quadratic equation ||z + t d|| == trust_radius.