Skip to content

Commit

Permalink
Small cleanup (#299)
Browse files Browse the repository at this point in the history
  • Loading branch information
jardinetsouffleton authored Dec 9, 2022
1 parent da59366 commit 24ea113
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions src/CP/variables/IntVar.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@ and that will be backtracked by `trailer`.
"""
function IntVar(min::Int, max::Int, id::String, trailer::Trailer)
offset = min - 1

dom = IntDomain(trailer, max - min + 1, offset)

return IntVar(Constraint[], dom, id, Set{AbstractIntVar}())
Expand Down Expand Up @@ -50,11 +49,10 @@ assign!(x::AbstractIntVar, value::Int) = assign!(x.domain, value)
"""
assignedValue(x::AbstractIntVar)
Return the assigened value of `x`. Throw an error if `x` is not bound.
Return the assigned value of `x`. Throw an error if `x` is not bound.
"""
function assignedValue(x::AbstractIntVar)
@assert isbound(x)

return minimum(x.domain)
end

Expand Down

0 comments on commit 24ea113

Please sign in to comment.