OpenMD
3.2
Molecular Dynamics in the Open
Toggle main menu visibility
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
27
#include "
math/DynamicRectMatrix.hpp
"
28
#include "
optimization/LineSearchBasedMethod.hpp
"
29
30
using namespace
OpenMD
;
31
namespace
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
DynamicRectMatrix.hpp
LineSearchBasedMethod.hpp
Abstract optimization method class.
OpenMD::DynamicRectMatrix
Rectangular matrix class with contiguous flat storage.
Definition
DynamicRectMatrix.hpp:78
OpenMD::DynamicVector
Dynamically-sized vector class.
Definition
DynamicVector.hpp:74
QuantLib::LineSearch
Base class for line search.
Definition
LineSearch.hpp:39
QuantLib::Problem
Constrained optimization problem.
Definition
Problem.hpp:37
OpenMD
This basic Periodic Table class was originally taken from the data.cpp file in OpenBabel.
Definition
ActionCorrFunc.cpp:63
optimization
BFGS.hpp
Generated on
for OpenMD by
1.17.0