Package org.xcsp.common
Interface FunctionalInterfaces.Intx4ToDom
-
- 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.Intx4ToDom
Represents a function that associates an integer domain (possibly,null) with four given integers. This is a functional interface whose functional method isapply(int,int,int,int). This may be useful when building 4-dimensional arrays of integer variables as for example in:
On our example, some variables have a domain containing 10 values whereas others have a domain containing two values only.Var[][][][] = array("x", size(10, 5, 3, 3), (i,j,k,l) -> i+j == k+l ? dom(range(10)) : dom(0,1));
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description Domains.Domapply(int i, int j, int k, int l)Returns an integer domain, computed from the specified integers.
-
-
-
Method Detail
-
apply
Domains.Dom apply(int i, int j, int k, int l)
Returns an integer domain, computed from the specified integers.- Parameters:
i- a first integerj- a second integerk- a third integerl- a fourth integer- Returns:
- an integer domain (possibly
null), computed from the specified integers
-
-