Skip to content

Commit 003e73f

Browse files
committed
Fix docstrings
1 parent 0a0f366 commit 003e73f

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

src/sets.jl

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,8 +1156,8 @@ This constraint is sometimes called `nvalues`.
11561156
```julia
11571157
model = Utilities.Model{Float64}()
11581158
n = add_constrained_variable(model, MOI.Integer())
1159-
x = [add_constrained_variable(model, MOI.Integer()) for _ in 1:3]
1160-
add_constraint(model, vcat(n, x), CountDistinct(4))
1159+
x = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
1160+
add_constraint(model, VectorOfVariables(vcat(n, x)), CountDistinct(4))
11611161
# if n == 1, then x[1] == x[2] == x[3]
11621162
# if n == 2, then x[1] == x[2] != x[3] || x[1] != x[2] == x[3]
11631163
# if n == 3, then x[1] != x[2] != x[3]
@@ -1170,10 +1170,10 @@ When the first element is `dimension - 1`, `CountDistinct` is equivalent to an
11701170
11711171
```julia
11721172
model = Utilities.Model{Float64}()
1173-
x = [add_constrained_variable(model, MOI.Integer()) for _ in 1:3]
1174-
add_constraint(model, vcat(3, x), CountDistinct(4))
1173+
x = [add_constrained_variable(model, MOI.Integer())[1] for _ in 1:3]
1174+
add_constraint(model, VectorOfVariables(vcat(3, x)), CountDistinct(4))
11751175
# equivalent to
1176-
add_constraint(model, x, AllDifferent(3))
1176+
add_constraint(model, VectorOfVariables(x), AllDifferent(3))
11771177
```
11781178
"""
11791179
struct CountDistinct <: AbstractVectorSet

0 commit comments

Comments
 (0)