Implements BFGS updates for approximating second-order derivatives within NLPsolvers. More...
#include <bfgs_update.hpp>
Implements BFGS updates for approximating second-order derivatives within NLPsolvers.
The class BFGSupdate implements BFGS updates for approximating second-order derivative information within iterative NLPsolvers.
Definition at line 67 of file bfgs_update.hpp.
Default constructor.
Definition at line 45 of file bfgs_update.cpp.
BFGSupdate::BFGSupdate | ( | UserInteraction * | _userInteraction, |
uint | _nBlocks = 0 |
||
) |
Constructor that takes the number of blocks for matrix block updates.
Definition at line 52 of file bfgs_update.cpp.
BFGSupdate::BFGSupdate | ( | const BFGSupdate & | rhs | ) |
Copy constructor (deep copy).
Definition at line 61 of file bfgs_update.cpp.
BFGSupdate::~BFGSupdate | ( | ) | [virtual] |
Destructor.
Definition at line 68 of file bfgs_update.cpp.
returnValue BFGSupdate::apply | ( | BlockMatrix & | B, |
const BlockMatrix & | x, | ||
const BlockMatrix & | y | ||
) | [virtual] |
Applies a BFGS update.
B | matrix to be updated |
x | direction x |
y | residuum |
Reimplemented from ConstantHessian.
Definition at line 113 of file bfgs_update.cpp.
returnValue BFGSupdate::applyBlockDiagonalUpdate | ( | BlockMatrix & | B, |
const BlockMatrix & | x, | ||
const BlockMatrix & | y | ||
) | [protected, virtual] |
Applies a block BFGS update to the diagonal of the matrix B. The integer N
specifies the number of blocks.
B_ii = B_ii - B_ii*x_i*x_i^T*B_ii/(x_i^T*B_ii*x_i) + y_i*y_i^T/(x_i^T*y_i)
B | matrix to be updated |
x | direction x |
y | residuum |
Definition at line 219 of file bfgs_update.cpp.
returnValue BFGSupdate::applyUpdate | ( | BlockMatrix & | B, |
const BlockMatrix & | x, | ||
const BlockMatrix & | y | ||
) | [protected, virtual] |
Applies a BFGS update in its "standard" form:
B = B - B*x*x^T*B/(x^T*B*x) + y*y^T/(x^T*y)
B | matrix to be updated |
x | direction x |
y | residuum |
Definition at line 130 of file bfgs_update.cpp.
NLPderivativeApproximation * BFGSupdate::clone | ( | ) | const [virtual] |
Reimplemented from ConstantHessian.
Definition at line 87 of file bfgs_update.cpp.
returnValue BFGSupdate::getSubBlockLine | ( | const int & | N, |
const int & | line1, | ||
const int & | line2, | ||
const int & | offset, | ||
const BlockMatrix & | M, | ||
BlockMatrix & | x | ||
) | [protected] |
Definition at line 257 of file bfgs_update.cpp.
returnValue BFGSupdate::initHessian | ( | BlockMatrix & | B, |
uint | N, | ||
const OCPiterate & | iter | ||
) | [virtual] |
B | matrix to be initialised |
N | number of intervals |
iter | current iterate |
Reimplemented from ConstantHessian.
Definition at line 94 of file bfgs_update.cpp.
returnValue BFGSupdate::initScaling | ( | BlockMatrix & | B, |
const BlockMatrix & | x, | ||
const BlockMatrix & | y | ||
) | [virtual] |
Applies an initial scaling of the form:
B = B*sqrt( (y^T*y)/(x^T*x) )
This rescaling can be used if the initial Hessian was a
unit matrix which should be auto-scaled in the first step
Note that the update will be skipped for the case that
x^T*x or y^T*y is less than 1000.0*EPS (safeguard
against unreasonable scaling).
B | matrix to be updated |
x | direction x |
y | residuum |
Reimplemented from ConstantHessian.
Definition at line 103 of file bfgs_update.cpp.
BFGSupdate & BFGSupdate::operator= | ( | const BFGSupdate & | rhs | ) |
Assignment operator (deep copy).
Definition at line 73 of file bfgs_update.cpp.
BooleanType BFGSupdate::performsBlockUpdates | ( | ) | const [inline] |
returnValue BFGSupdate::setBFGSModification | ( | const BFGSModificationType & | modification_ | ) | [inline] |
returnValue BFGSupdate::setSubBlockLine | ( | const int & | N, |
const int & | line1, | ||
const int & | line2, | ||
const int & | offset, | ||
BlockMatrix & | M, | ||
const BlockMatrix & | x | ||
) | [protected] |
Definition at line 285 of file bfgs_update.cpp.
BFGSModificationType BFGSupdate::modification [protected] |
Definition at line 193 of file bfgs_update.hpp.
uint BFGSupdate::nBlocks [protected] |
Definition at line 195 of file bfgs_update.hpp.