Package org.xcsp.common
Interface FunctionalInterfaces.IntToDomSymbolic
-
- Enclosing interface:
- FunctionalInterfaces
- Functional Interface:
- This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.
@FunctionalInterface public static interface FunctionalInterfaces.IntToDomSymbolic
Represents a function that associates a symbolic domain (possibly,null) with a given integer. This is a functional interface whose functional method isapply(int). This may be useful when building 1-dimensional arrays of symbolic variables as for example in: *
On our example, the first five variables have a domain containing 3 values whereas the next five variables have a domain containing two values only.VarSymbolic[] = array("x", size(10), i -> i < 5 ? dom("red","green","blue") : dom("yellow","orange"));
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Domains.DomSymbolicapply(int i)Returns a symbolic domain, computed from the specified integer.
-
-
-
Method Detail
-
apply
Domains.DomSymbolic apply(int i)
Returns a symbolic domain, computed from the specified integer.- Parameters:
i- an integer- Returns:
- a symbolic domain (possibly
null), computed from the specified integer
-
-