Skip to content

Commit

Permalink
Add docstrings
Browse files Browse the repository at this point in the history
  • Loading branch information
blegat committed Dec 20, 2023
1 parent 493428d commit a42fc0c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions src/Bridges/Variable/map.jl
Original file line number Diff line number Diff line change
Expand Up @@ -219,10 +219,20 @@ function number_with_set(map::Map, S::Type{<:MOI.AbstractSet})
return count(isequal(S), map.sets)
end

"""
first_variable(::Map, ci::MOI.ConstraintIndex{MOI.VariableIndex})
Return the `MOI.VariableIndex` of the `MOI.ConstraintFunction` of `ci`.
"""
function first_variable(::Map, ci::MOI.ConstraintIndex{MOI.VariableIndex})
return MOI.VariableIndex(ci.value)
end

"""
first_variable(::Map, ci::MOI.ConstraintIndex{MOI.VariableIndex})
Return the first `MOI.VariableIndex` of the `MOI.ConstraintFunction` of `ci`.
"""
function first_variable(
map::Map,
ci::MOI.ConstraintIndex{MOI.VectorOfVariables},
Expand Down

0 comments on commit a42fc0c

Please sign in to comment.