-
Notifications
You must be signed in to change notification settings - Fork 105
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
return approximate Hessian and inverse Hessian
- Loading branch information
Showing
2 changed files
with
13 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
// Copyright (C) 2016-2023 Yixuan Qiu <[email protected]> | ||
// Copyright (C) 2016-2024 Yixuan Qiu <[email protected]> | ||
// Under MIT license | ||
|
||
#ifndef LBFGSPP_LBFGS_H | ||
|
@@ -185,6 +185,16 @@ class LBFGSSolver | |
/// Returning the Euclidean norm of the final gradient. | ||
/// | ||
Scalar final_grad_norm() const { return m_gnorm; } | ||
|
||
/// | ||
/// Returning the approximate Hessian matrix on the last iterate. | ||
/// | ||
Matrix final_approx_hessian() const { return m_bfgs.get_Bmat(); } | ||
|
||
/// | ||
/// Returning the approximate inverse Hessian matrix on the last iterate. | ||
/// | ||
Matrix final_approx_inverse_hessian() const { return m_bfgs.get_Hmat(); } | ||
}; | ||
|
||
} // namespace LBFGSpp | ||
|