Skip to content

Commit 69eae72

Browse files
committed
Update
1 parent 2676c1b commit 69eae72

File tree

2 files changed

+5
-4
lines changed

2 files changed

+5
-4
lines changed

src/Nonlinear/parse.jl

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,8 @@ function _parse_without_recursion_inner(stack, data, expr, x, parent)
6767
end
6868
push!(expr.nodes, Node(node_type, id, parent))
6969
parent = length(expr.nodes)
70-
# Args need to be pushed onto the stack in reverse
70+
# Args need to be pushed onto the stack in reverse because the stack is a
71+
# first-in last-out datastructure.
7172
for arg in reverse(x.args)
7273
push!(stack, (parent, arg))
7374
end

src/attributes.jl

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1857,9 +1857,9 @@ function attribute_value_type(::ConstraintConflictStatus)
18571857
end
18581858

18591859
"""
1860-
UserDefinedFunction(name::Symbol, N::Int)
1860+
UserDefinedFunction(name::Symbol, arity::Int)
18611861
1862-
Set a user-defined function by the name of `Name` with `N` arguments.
1862+
Set a user-defined function by the name of `Name` with `arity` arguments.
18631863
18641864
The value to be set is a tuple containg one to three functions, representing the
18651865
zero, first, and second-order derivatives of the function.
@@ -1883,7 +1883,7 @@ MOI.set(model, MOI.UserDefinedFunction(:f, 2), (f, ∇f, ∇²f))
18831883
"""
18841884
struct UserDefinedFunction <: AbstractModelAttribute
18851885
name::Symbol
1886-
N::Int
1886+
arity::Int
18871887
end
18881888

18891889
"""

0 commit comments

Comments
 (0)