|
LSLOpt
1.0
|
BFGS storage. More...
#include <BFGSStorage.hpp>
Public Member Functions | |
| BFGSStorage (Eigen::Index n, Eigen::Index, Scalar, OutputFunction &output_function) | |
| Construct a BFGS storage. More... | |
| void | reset () |
| Reset the (inverse) Hessian approximation to identity matrix. More... | |
| Vector< Scalar > | calculate_Hv (const Vector< Scalar > &v) |
Calculate product of inverse Hessian approximation with vector . More... | |
| Scalar | calculate_vHv (const Vector< Scalar > &v) |
Calculate normalized scalar product of vector with inverse Hessian approximation . More... | |
| const Matrix< Scalar > & | calculate_H () |
Access the inverse Hessian approximation . More... | |
| Vector< Scalar > | calculate_Bv (const Vector< Scalar > &v) |
Calculate product of Hessian approximation with vector . More... | |
| Scalar | calculate_vBv (const Vector< Scalar > &v) |
Calculate normalized scalar product of vector with Hessian approximation . More... | |
| const Matrix< Scalar > & | calculate_B () |
Access the Hessian approximation . More... | |
| bool | update (const Vector< Scalar > &s, const Vector< Scalar > &y, const Vector< Scalar > &g) |
| Update the (inverse) Hessian approximation. More... | |
Public Attributes | |
| Eigen::Index | n |
| dimensionality of the problem | |
| Matrix< Scalar > | H |
| inverse Hessian approximation | |
| Matrix< Scalar > | B |
| Hessian approximation. | |
| bool | initial |
| is this the initial approximation? | |
| OutputFunction & | output_function |
| output function for status messages | |
BFGS storage.
This is the implementation of the BFGS algorithm. It directly stores the approximate Hessian
and the inverse approximate inverse Hessian
.
| Scalar | The scalar type of vector/matrix coefficients. |
It requires
storage!
| LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::BFGSStorage | ( | Eigen::Index | n, |
| Eigen::Index | , | ||
| Scalar | , | ||
| OutputFunction & | output_function | ||
| ) |
Construct a BFGS storage.
| n | Dimensionality of the problem. |
| output_function | Output function for status messages. |
The second and third parameter are unused.
| const Matrix< Scalar > & LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_B | ( | ) |
Access the Hessian approximation
.
Runtime
.
| Vector< Scalar > LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_Bv | ( | const Vector< Scalar > & | v | ) |
Calculate product of Hessian approximation
with vector
.
| v | Vector for calculation. |
.Runtime
.
| const Matrix< Scalar > & LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_H | ( | ) |
Access the inverse Hessian approximation
.
Runtime
.
| Vector< Scalar > LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_Hv | ( | const Vector< Scalar > & | v | ) |
Calculate product of inverse Hessian approximation
with vector
.
| v | Vector for calculation. |
.Runtime
.
| Scalar LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_vBv | ( | const Vector< Scalar > & | v | ) |
Calculate normalized scalar product of vector
with Hessian approximation
.
| v | Vector for calculation. |
.Runtime
.
| Scalar LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::calculate_vHv | ( | const Vector< Scalar > & | v | ) |
Calculate normalized scalar product of vector
with inverse Hessian approximation
.
| v | Vector for calculation. |
.Runtime
.
| void LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::reset | ( | ) |
Reset the (inverse) Hessian approximation to identity matrix.
Runtime
.
| bool LSLOpt::Implementation::BFGSStorage< Scalar, OutputFunction >::update | ( | const Vector< Scalar > & | s, |
| const Vector< Scalar > & | y, | ||
| const Vector< Scalar > & | g | ||
| ) |
Update the (inverse) Hessian approximation.
| s | Change in x coordinate. |
| y | Change in gradient. |
| g | New gradient. |
true if successful, false otherwiseRuntime
(depends on the matrix multiplication algorithm in Eigen).
1.8.13