summaryrefslogtreecommitdiff
path: root/utils/lbfgs.h
blob: ed5cd9443503ea0c20bd9f669b7e563280525f3e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
#ifndef _LBFGS_H_
#define _LBFGS_H_

// template<class FuncGrad>
// std::vector<double>
// perform_LBFGS(FuncGrad func_grad, const std::vector<double> & x0);

std::vector<double> perform_LBFGS(
    double (*func_grad)(const std::vector<double> &, std::vector<double> &),
    const std::vector<double> &x0);

std::vector<double> perform_OWLQN(
    double (*func_grad)(const std::vector<double> &, std::vector<double> &),
    const std::vector<double> &x0, const double C);

// const int    LBFGS_M = 7;
const int LBFGS_M = 10;

#endif