mirror of
https://github.com/gonum/gonum.git
synced 2025-10-04 23:02:42 +08:00
optimize: add doc comments for Location fields
This commit is contained in:
@@ -35,9 +35,22 @@ type Task struct {
|
||||
|
||||
// Location represents a location in the optimization procedure.
|
||||
type Location struct {
|
||||
// X is the function input for the location.
|
||||
X []float64
|
||||
// F is the result of evaluating the function at X.
|
||||
F float64
|
||||
// Gradient holds the first-order partial derivatives
|
||||
// of the function at X.
|
||||
// The length of Gradient must match the length of X
|
||||
// or be zero. If the capacity of Gradient is less
|
||||
// than the length of X, a new slice will be allocated.
|
||||
Gradient []float64
|
||||
// Hessian holds the second-order partial derivatives
|
||||
// of the function at X.
|
||||
// The dimensions of Hessian must match the length of X
|
||||
// or Hessian must be nil or empty. If Hessian is nil
|
||||
// a new mat.SymDense will be allocated, if it is empty
|
||||
// it will be resized to match the length of X.
|
||||
Hessian *mat.SymDense
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user