OpenMD 3.0
Molecular Dynamics in the Open
Loading...
Searching...
No Matches
BFGS.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) 2009 Frédéric Degraeve
5
6 This file is part of QuantLib, a free-software/open-source library
7 for financial quantitative analysts and developers - http://quantlib.org/
8
9 QuantLib is free software: you can redistribute it and/or modify it
10 under the terms of the QuantLib license. You should have received a
11 copy of the license along with this program; if not, please email
12 <quantlib-dev@lists.sf.net>. The license is also available online at
13 <http://quantlib.org/license.shtml>.
14
15 This program is distributed in the hope that it will be useful, but WITHOUT
16 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
17 FOR A PARTICULAR PURPOSE. See the license for more details.
18*/
19
20/*! \file bfgs.hpp
21 \brief Broyden-Fletcher-Goldfarb-Shanno optimization method
22*/
23
24#ifndef quantlib_optimization_bfgs_hpp
25#define quantlib_optimization_bfgs_hpp
26
29
30using namespace OpenMD;
31namespace QuantLib {
32
33 //! Broyden-Fletcher-Goldfarb-Shanno algorithm
34 /*! See <http://en.wikipedia.org/wiki/BFGS_method>.
35
36 Adapted from Numerical Recipes in C, 2nd edition.
37
38 User has to provide line-search method and optimization end criteria.
39 */
40 class BFGS : public LineSearchBasedMethod {
41 public:
42 BFGS(LineSearch* lineSearch = NULL) : LineSearchBasedMethod(lineSearch) {}
43
44 private:
45 //! \name LineSearchBasedMethod interface
46 //@{
47 DynamicVector<RealType> getUpdatedDirection(
48 const Problem& P, RealType gold2,
49 const DynamicVector<RealType>& oldGradient);
50 //@}
51 //! inverse of hessian matrix
52 DynamicRectMatrix<RealType> inverseHessian_;
53 };
54
55} // namespace QuantLib
56
57#endif
Abstract optimization method class.
rectangular matrix class
Dynamically-sized vector class.
Broyden-Fletcher-Goldfarb-Shanno algorithm.
Definition BFGS.hpp:40
Base class for line search.
Constrained optimization problem.
Definition Problem.hpp:37
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.