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,10 +35,23 @@ type Task struct {
|
|||||||
|
|
||||||
// Location represents a location in the optimization procedure.
|
// Location represents a location in the optimization procedure.
|
||||||
type Location struct {
|
type Location struct {
|
||||||
X []float64
|
// X is the function input for the location.
|
||||||
F float64
|
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
|
Gradient []float64
|
||||||
Hessian *mat.SymDense
|
// 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
|
||||||
}
|
}
|
||||||
|
|
||||||
// Method is a type which can search for an optimum of an objective function.
|
// Method is a type which can search for an optimum of an objective function.
|
||||||
|
Reference in New Issue
Block a user