Skip to content

Commit 78c15ba

Browse files
authored
properly document batch deletion (#992)
1 parent b890e45 commit 78c15ba

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

docs/src/apireference.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -197,6 +197,7 @@ ConstraintIndex
197197
is_valid
198198
throw_if_not_valid
199199
delete(::ModelLike, ::Index)
200+
delete(::ModelLike, ::Vector{<:Index})
200201
```
201202

202203
### Variables

src/indextypes.jl

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -116,10 +116,12 @@ The following modifications also take effect if `Index` is [`VariableIndex`](@re
116116
delete(model::ModelLike, index::Index) = throw(DeleteNotAllowed(index))
117117

118118
"""
119-
delete{R}(model::ModelLike, indices::Vector{R<:Index})
119+
delete(model::ModelLike, indices::Vector{R<:Index}) where {R}
120120
121121
Delete the referenced objects in the vector `indices` from the model.
122-
It may be assumed that `R` is a concrete type.
122+
It may be assumed that `R` is a concrete type. The default fallback sequentially
123+
deletes the individual items in `indices`, although specialized implementations
124+
may be more efficient.
123125
"""
124126
function delete(model::ModelLike, indices::Vector{<:Index})
125127
for index in indices

0 commit comments

Comments
 (0)