BFGS.h
Go to the documentation of this file.
1//===========================================================================
2/*!
3 *
4 *
5 * \brief BFGS
6 *
7 * The Broyden, Fletcher, Goldfarb, Shannon (BFGS) algorithm is a
8 * quasi-Newton method for unconstrained real-valued optimization.
9 *
10 *
11 *
12 * \author O. Krause
13 * \date 2010
14 *
15 *
16 * \par Copyright 1995-2017 Shark Development Team
17 *
18 * <BR><HR>
19 * This file is part of Shark.
20 * <https://shark-ml.github.io/Shark/>
21 *
22 * Shark is free software: you can redistribute it and/or modify
23 * it under the terms of the GNU Lesser General Public License as published
24 * by the Free Software Foundation, either version 3 of the License, or
25 * (at your option) any later version.
26 *
27 * Shark is distributed in the hope that it will be useful,
28 * but WITHOUT ANY WARRANTY; without even the implied warranty of
29 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
30 * GNU Lesser General Public License for more details.
31 *
32 * You should have received a copy of the GNU Lesser General Public License
33 * along with Shark. If not, see <http://www.gnu.org/licenses/>.
34 *
35 */
36//===========================================================================
37
38
39#ifndef SHARK_ALGORITHMS_GRADIENTDESCENT_BFGS_H
40#define SHARK_ALGORITHMS_GRADIENTDESCENT_BFGS_H
41
43
44namespace shark {
45
46/// \brief Broyden, Fletcher, Goldfarb, Shannon algorithm for unconstraint optimization
47/// \ingroup gradientopt
48template<class SearchPointType = RealVector>
49class BFGS : public AbstractLineSearchOptimizer<SearchPointType>
50{
51public:
53protected:
54 void initModel();
56public:
57 std::string name() const
58 { return "BFGS"; }
59
60 //from ISerializable
61 void read( InArchive & archive );
62 void write( OutArchive & archive ) const;
63protected:
64 RealMatrix m_hessian;
65};
66
67//implementation is included in the library
68extern template class BFGS<RealVector>;
69extern template class BFGS<FloatVector>;
70
71}
72#endif