Skip to content

Commit

Permalink
isNeq instead of neqView
Browse files Browse the repository at this point in the history
  • Loading branch information
cprudhom committed Oct 12, 2023
1 parent eef5325 commit ee61b23
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@ public BoolVar boolVar() {
me = model.isGeq(v1, e2 + 1);
break;
case NE:
me = model.neqView(v1, e2);
me = model.isNeq(v1, e2);
break;
case EQ:
me = model.isEq(v1, e2);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,7 @@ default IntVar mul(IntVar var, int a) {
* @param v a constant
* @return a boolean view
*/
default BoolVar neqView(IntVar var, int v) {
default BoolVar isNeq(IntVar var, int v) {
if (var.isInstantiatedTo(v)) {
return ref().boolVar(false);
} else if (!var.contains(v)) {
Expand Down Expand Up @@ -414,11 +414,11 @@ default BoolVar intEqView(IntVar x, int c) {
* @param c a constant
* @return a BoolVar that reifies <i>x != c</i>
* @deprecated
* @see #neqView(IntVar, int)
* @see #isNeq(IntVar, int)
*/
@Deprecated
default BoolVar intNeView(IntVar x, int c) {
return neqView(x, c);
return isNeq(x, c);
}

/**
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -920,7 +920,7 @@ public void testMagnusR4() {
final IntVar[] vars = model.intVarArray(n, 0, n);
model.allDifferent(vars).post();
final IntVar[] ges = Stream.of(vars).map(
v -> model.neqView(v, n / 2)
v -> model.isNeq(v, n / 2)
)
.toArray(IntVar[]::new);

Expand Down

0 comments on commit ee61b23

Please sign in to comment.