We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9358c02 commit 072123bCopy full SHA for 072123b
src/utils.jl
@@ -6,24 +6,6 @@ import NLPModels.increment!, NLPModels.decrement!
6
using JuMP, MathOptInterface
7
const MOI = MathOptInterface
8
9
-"""
10
- @lencheck expected expr
11
-
12
-Macro to check that `length(expr) == expected` at runtime.
13
-Throws an ArgumentError with a helpful message when the lengths mismatch.
14
-Example:
15
- @lencheck nlp.meta.nvar x
16
17
-macro lencheck(expected, var)
18
- return esc(:(begin
19
- _len_expected = $(expected)
20
- _len_var = length($(var))
21
- if _len_var != _len_expected
22
- throw(ArgumentError("length($(QuoteNode(var))) = $( _len_var ) but expected $( _len_expected )"))
23
- end
24
- end))
25
-end
26
27
# VariableIndex
28
const VI = MOI.VariableIndex # VariableIndex(value)
29
0 commit comments