ReadonlydimensionNumber of rows and columns in square matrix Q. When the Hessian is passed
to a model, this must equal that model's numCols, because there is one
Hessian coordinate per decision variable. It must be a non-negative signed
32-bit integer.
ReadonlyformatSelects which entries of symmetric matrix Q are supplied.
"triangular" stores only the lower triangle in compressed-column form, so
every entry in column j must have row index i >= j. HiGHS infers the
mirrored upper triangle. "square" stores every matrix entry, so each
off-diagonal value must be supplied in both symmetric coordinates and the
resulting matrix must be symmetric.
ReadonlyindicesZero-based row coordinate of each packed Hessian value. Position k
represents matrix coordinate (indices[k], j), where column j is the
unique column whose interval starts[j] <= k < starts[j + 1] contains it.
Every index must satisfy 0 <= indices[k] < dimension. In triangular mode
it must additionally satisfy indices[k] >= j. A column must not contain a
duplicate row index. The array length must equal values.length and the
final starts entry.
ReadonlystartsCompressed-column boundaries into indices and values. Hessian column j
occupies positions from starts[j] inclusive to starts[j + 1] exclusive.
Equal adjacent values represent an empty column.
The array must have exactly dimension + 1 entries, begin with 0, be
nondecreasing, and end with
indices.length === values.length === starts[dimension].
For example, [0, 2, 3] means column 0 has two stored entries and column 1
has one.
ReadonlyvaluesEntries of symmetric matrix Q, parallel to indices. values[k] is the
value at the row given by indices[k] and the column determined by
starts. These are entries of Q itself in objective
0.5 * x'Qx; do not halve diagonal values or double off-diagonal values.
Values must be finite numbers and the length must equal indices.length
and the final starts entry. For triangular encoding of
Q = [[2, 1], [1, 4]], use starts: [0, 2, 3],
indices: [0, 1, 1], and values: [2, 1, 4].
Sparse symmetric Hessian
Qfor the quadratic objectivesense * (offset + c'x + 0.5 * x'Qx).Storage is compressed by column.
startsfollows the same offset invariants as a CSC matrix and must havedimension + 1entries;indicescontains zero-based row indices, andstarts[dimension] === indices.length === values.length. Duplicate row indices within a column are invalid.For
"triangular", provide the lower triangle only: an entry in columnjhas rowi >= j. For"square", provide the complete symmetric matrix, including both off-diagonal(i, j)and(j, i)entries. Values are entries ofQ; do not pre-multiply them by0.5.Example:
Q = [[2, 1], [1, 4]]is triangularly encoded bystarts: [0, 2, 3],indices: [0, 1, 1],values: [2, 1, 4]. It contributesx0^2 + x0*x1 + 2*x1^2to the objective. Inputs are copied synchronously.