Internal functions
These functions may or may not be exported. They are used internally.
NLPModels.@default_counters
— Macro@default_counters Model inner
Define functions relating counters of Model
to counters of Model.inner
.
NLPModels.@default_nlscounters
— Macro@default_nlscounters Model inner
Define functions relating NLS counters of Model
to NLS counters of Model.inner
.
NLPModels.@lencheck
— Macro@lencheck n x y z …
Check that arrays x
, y
, z
, etc. have a prescribed length n
.
NLPModels.@rangecheck
— Macro@rangecheck ℓ u i j k …
Check that values i
, j
, k
, etc. are in the range [ℓ,u]
.
NLPModels.coo_prod!
— Functioncoo_prod!(rows, cols, vals, v, Av)
Compute the product of a matrix A
given by (rows, cols, vals)
and the vector v
. The result is stored in Av
, which should have length equals to the number of rows of A
.
NLPModels.coo_sym_prod!
— Functioncoo_sym_prod!(rows, cols, vals, v, Av)
Compute the product of a symmetric matrix A
given by (rows, cols, vals)
and the vector v
. The result is stored in Av
, which should have length equals to the number of rows of A
. Only one triangle of A
should be passed.
NLPModels.decrement!
— Functiondecrement!(nlp, s)
Decrement counter s
of problem nlp
.
NLPModels.DimensionError
— TypeDimensionError <: Exception
DimensionError(name, dim_expected, dim_found)
Error for unexpected dimension. Output: "DimensionError: Input name
should have length dim_expected
not dim_found
"
NLPModels.histline
— Functionhistline(s, v, maxv)
Return a string of the form
______NAME______: ████⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅⋅ 5
where:
______NAME______
iss
with padding to the left and length 16.- And the symbols █ and ⋅ fill 20 characters in the proportion of
v / maxv
to █ and the rest to ⋅. - The number
5
is v.
NLPModels.increment!
— Functionincrement!(nlp, s)
Increment counter s
of problem nlp
.
increment!(nls, s)
Increment counter s
of problem nls
.
NLPModels.lines_of_description
— Functionlines_of_description(meta)
Describe meta
for the show
function.
lines_of_description(nls_meta)
Describe nls_meta
for the show
function.
NLPModels.lines_of_hist
— Functionlines_of_hist(S, V)
Return a vector of histline(s, v, maxv)
s using pairs of s
in S
and v
in V
. maxv
is given by the maximum of V
.
NLPModels.show_counters
— Functionshow_counters(io, counters, fields)
Show the fields
of the struct counters
.
NLPModels.show_header
— Functionshow_header(io, nlp)
Show a header for the specific nlp
type. Should be imported and defined for every model implementing the NLPModels API.
NLPModels.sparsityline
— Functionsparsityline(s, v, maxv)
Return a string of the form
______NAME______: ( 80.00% sparsity) 5
where:
______NAME______
iss
with padding to the left and length 16.- The sparsity value is given by
v / maxv
. - The number
5
is v.