-
-
Notifications
You must be signed in to change notification settings - Fork 42
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
13 changed files
with
163 additions
and
116 deletions.
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
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
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
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 |
---|---|---|
@@ -0,0 +1,26 @@ | ||
""" | ||
DescentResult(; δu = missing, u = missing, success::Bool = true, extras = (;)) | ||
Construct a `DescentResult` object. | ||
### Keyword Arguments | ||
* `δu`: The descent direction. | ||
* `u`: The new iterate. This is provided only for multi-step methods currently. | ||
* `success`: Certain Descent Algorithms can reject a descent direction for example | ||
[`GeodesicAcceleration`](@ref). | ||
* `extras`: A named tuple containing intermediates computed during the solve. | ||
For example, [`GeodesicAcceleration`](@ref) returns `NamedTuple{(:v, :a)}` containing | ||
the "velocity" and "acceleration" terms. | ||
""" | ||
@concrete struct DescentResult | ||
δu | ||
u | ||
success::Bool | ||
extras | ||
end | ||
|
||
function DescentResult(; δu = missing, u = missing, success::Bool = true, extras = (;)) | ||
@assert δu !== missing || u !== missing | ||
return DescentResult(δu, u, success, extras) | ||
end |
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
Oops, something went wrong.