QuantLib: a free/open-source library for quantitative finance
fully annotated source code - version 1.34
Loading...
Searching...
No Matches
goldstein.hpp
Go to the documentation of this file.
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
19/*! \file goldstein.hpp
20 \brief Goldstein and Price line-search class
21*/
22
23#ifndef quantlib_optimization_goldstein_hpp
24#define quantlib_optimization_goldstein_hpp
25
27
28namespace QuantLib {
29
31 public:
32 //! Default constructor
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
39 //! Perform line search
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
Line search abstract class.
Definition: any.hpp:35
Real beta
Definition: sabr.cpp:200
Real alpha
Definition: sabr.cpp:200