QuantLib: a free/open-source library for quantitative finance
Fully annotated sources - version 1.32
Loading...
Searching...
No Matches
goldstein.hpp
1/* -*- mode: c++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
2
3/*
4 Copyright (C) 2015 Cheng Li
5 This file is part of QuantLib, a free-software/open-source library
6 for financial quantitative analysts and developers - http://quantlib.org/
7
8 QuantLib is free software: you can redistribute it and/or modify it
9 under the terms of the QuantLib license. You should have received a
10 copy of the license along with this program; if not, please email
11 <quantlib-dev@lists.sf.net>. The license is also available online at
12 <http://quantlib.org/license.shtml>.
13
14 This program is distributed in the hope that it will be useful, but WITHOUT
15 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 FOR A PARTICULAR PURPOSE. See the license for more details.
17*/
18
23#ifndef quantlib_optimization_goldstein_hpp
24#define quantlib_optimization_goldstein_hpp
25
26#include <ql/math/optimization/linesearch.hpp>
27
28namespace QuantLib {
29
31 public:
34 Real alpha = 0.05,
35 Real beta = 0.65,
36 Real extrapolation = 1.5)
37 : LineSearch(eps), alpha_(alpha), beta_(beta), extrapolation_(extrapolation) {}
38
40 Real operator()(Problem& P, // Optimization problem
41 EndCriteria::Type& ecType,
42 const EndCriteria&,
43 Real t_ini) override; // initial value of line-search step
44
45 private:
48 };
49
50}
51
52#endif
Criteria to end optimization process:
Definition: endcriteria.hpp:40
Real operator()(Problem &P, EndCriteria::Type &ecType, const EndCriteria &, Real t_ini) override
Perform line search.
Definition: goldstein.cpp:26
GoldsteinLineSearch(Real eps=1e-8, Real alpha=0.05, Real beta=0.65, Real extrapolation=1.5)
Default constructor.
Definition: goldstein.hpp:33
Base class for line search.
Definition: linesearch.hpp:38
Constrained optimization problem.
Definition: problem.hpp:42
QL_REAL Real
real number
Definition: types.hpp:50
Definition: any.hpp:35