Loading...
Searching...
No Matches
LBFGS.h
Go to the documentation of this file.
1// SPDX-License-Identifier: MIT
2// Copyright (c) gpridge developers
3// See LICENSE for details.
4
5/*
6 * LBFGS.h
7 *
8 * Created on: 31 Mar 2021
9 * Author: Maxim Masterov
10 * Company: SURFSara
11 */
12
13#ifndef GPR_LBFGS_H
14#define GPR_LBFGS_H
15
16#include <Eigen/Core>
17#include <deque>
18#include <functional>
19
22
23namespace gpr {
24namespace optim {
25
30void excludeNonPositiveCurvatureBlock(Eigen::VectorXd& s, Eigen::VectorXd& y,
31 Eigen::Index offset, Eigen::Index length);
32
41[[nodiscard]] double barzilaiBorweinInverseScale(const Eigen::VectorXd& s,
42 const Eigen::VectorXd& y,
43 double fallback);
44
62[[nodiscard]] Eigen::VectorXd twoLoopRecursion(
63 const std::deque<Eigen::VectorXd>& s_hist,
64 const std::deque<Eigen::VectorXd>& y_hist,
65 const std::deque<double>& rho_hist, const Eigen::VectorXd& force,
66 double H0);
67
82[[nodiscard]] Eigen::VectorXd twoLoopRecursion(
83 const std::deque<Eigen::VectorXd>& s_hist,
84 const std::deque<Eigen::VectorXd>& y_hist,
85 const std::deque<double>& rho_hist, const Eigen::VectorXd& force,
86 const std::function<Eigen::VectorXd(const Eigen::VectorXd&)>& apply_H0);
87
88} /* namespace optim */
89} /* namespace gpr */
90
91#endif /* GPR_LBFGS_H */
@ y
Definition Enums.h:28
double barzilaiBorweinInverseScale(const Eigen::VectorXd &s, const Eigen::VectorXd &y, double fallback)
Scalar BB2 inverse-curvature seed for L-BFGS H0.
Definition LBFGS.cpp:39
void excludeNonPositiveCurvatureBlock(Eigen::VectorXd &s, Eigen::VectorXd &y, Eigen::Index offset, Eigen::Index length)
Definition LBFGS.cpp:25
Eigen::VectorXd twoLoopRecursion(const std::deque< Eigen::VectorXd > &s_hist, const std::deque< Eigen::VectorXd > &y_hist, const std::deque< double > &rho_hist, const Eigen::VectorXd &force, double H0)
Nocedal two-loop recursion (the LBFGS kernel).
Definition LBFGS.cpp:51
Gaussian-process regression, kernels, priors, and the searches that run on the surrogate.
Definition Macros.h:16