jopt.csp.variable
Interface CspSetConstraints


public interface CspSetConstraints

Interface for a class that is used to create constraints on set variables


Method Summary
 CspConstraint eqIntersection(CspSetVariable[] sources, CspSetVariable target)
          Constraint representing intersection( sources ) = target.
 CspConstraint eqIntersection(CspSetVariable x, CspSetVariable y, CspSetVariable z)
          Constraint representing intersection( X, Y ) = Z.
 CspConstraint eqPartition(CspSetVariable[] sources, CspSetVariable target)
          Constraint representing partition( sources ) = target.
 CspConstraint eqPartition(CspSetVariable[] sources, CspSetVariable target, boolean advancedFilter)
          Constraint representing partition( X, Y ) = Z that has more advanced filtering than the normal eqPartition constraint.
 CspConstraint eqPartition(CspSetVariable x, CspSetVariable y, CspSetVariable z)
          Constraint representing partition( X, Y ) = Z.
 CspConstraint eqPartition(CspSetVariable x, CspSetVariable y, CspSetVariable z, boolean advancedFilter)
          Constraint representing partition( X, Y ) = Z that has more advanced filtering than the normal eqPartition constraint Advanced filtering will reduce domains more than normal but takes longer to run.
 CspConstraint eqSubset(CspSetVariable a, CspSetVariable b)
          Creates new constraint representing B is a subset of A
 CspConstraint eqSubset(CspSetVariable a, java.util.Set b)
          Creates new constraint representing b is a subset of A
 CspConstraint eqSubset(java.util.Set a, CspSetVariable b)
          Creates new constraint representing B is a subset of a
 CspConstraint eqUnion(CspSetVariable[] sources, CspSetVariable target)
          Creates new union constraint representing union( sources ) = target
 CspConstraint eqUnion(CspSetVariable[] sources, CspSetVariable target, boolean advancedFilter)
          Creates new union constraint that will filter the domains more than the normal eqUnion constraint, but will take longer to run.
 CspConstraint eqUnion(CspSetVariable x, CspSetVariable y, CspSetVariable z)
          Creates new union constraint representing union( X, Y ) = Z
 CspConstraint eqUnion(CspSetVariable x, CspSetVariable y, CspSetVariable z, CspSetVariable intersect)
          Creates new union constraint that can utilize a variable that is the intersection of X and Y variables to further reduce the target Z than the normal eqUnion constraint.
 CspConstraint memberOfSet(CspIntSetVariable set, CspIntExpr expr)
          Constrains a numeric expression to be a member of a set.
 CspConstraint notMemberOfSet(CspIntSetVariable set, CspIntExpr expr)
          Constrains a numeric expression to not be a member of a set.
 CspConstraint nullIntersection(CspSetVariable[] sources)
          Creates new constraint representing null-intersection( sources )
 CspConstraint nullIntersection(CspSetVariable a, CspSetVariable b)
          Creates new constraint representing null-intersection( A, B )
 CspConstraint nullIntersection(CspSetVariable a, java.util.Set constb)
          Creates new constraint representing null-intersection( A, b )
 CspConstraint nullIntersection(java.util.Set consta, CspSetVariable b)
          Creates new constraint representing null-intersection( a, B )
 CspConstraint strictSubset(CspSetVariable a, CspSetVariable b)
          Creates new constraint representing B is a strict subset of A
 CspConstraint strictSubset(CspSetVariable a, java.util.Set b)
          Creates new constraint representing b is a strict subset of A
 CspConstraint strictSubset(java.util.Set a, CspSetVariable b)
          Creates new constraint representing B is a strict subset of a
 

Method Detail

eqIntersection

public CspConstraint eqIntersection(CspSetVariable x,
                                    CspSetVariable y,
                                    CspSetVariable z)
Constraint representing intersection( X, Y ) = Z. Restricts variable Z to be equal to the intersection of X and Y

Parameters:
x - First set variable used to create intersection
y - Second set variable used to create intersection
z - Set variable that is constrained to be equal to intersection of X and Y
Returns:
Intersection constraint that can be added to solver

eqIntersection

public CspConstraint eqIntersection(CspSetVariable[] sources,
                                    CspSetVariable target)
Constraint representing intersection( sources ) = target. Restricts a target variable to be equal to the intersection of an array of source variables

Parameters:
sources - Array of variables used to create intersection
target - Set variable constrained equal to interesection of source variables
Returns:
Intersection constraint that can be added to solver

eqPartition

public CspConstraint eqPartition(CspSetVariable x,
                                 CspSetVariable y,
                                 CspSetVariable z)
Constraint representing partition( X, Y ) = Z. This is similar to a union constraint except the source variables cannot share any common values.

Parameters:
x - First variable used to form union constrained to have no common values with y
y - Second variable used to form union constrained to have no common values with x
z - Target variable that is constrained to be equal to the union of the sources
Returns:
Partition constraint that can be added to solver

eqPartition

public CspConstraint eqPartition(CspSetVariable[] sources,
                                 CspSetVariable target)
Constraint representing partition( sources ) = target. This is similar to a union constraint except the source variables cannot share any common values.

Parameters:
sources - Array of sources that form the union constrained to have no common values
target - Target variable that is constrained to be equal to the union of the sources
Returns:
Partition constraint that can be added to solver

eqPartition

public CspConstraint eqPartition(CspSetVariable x,
                                 CspSetVariable y,
                                 CspSetVariable z,
                                 boolean advancedFilter)
Constraint representing partition( X, Y ) = Z that has more advanced filtering than the normal eqPartition constraint Advanced filtering will reduce domains more than normal but takes longer to run.

Parameters:
x - First variable used to form union constrained to have no common values with y
y - Second variable used to form union constrained to have no common values with x
z - Target variable that is constrained to be equal to the union of the sources
advancedFilter - True if advanced filtering should be performed
Returns:
Partition constraint that can be added to solver

eqPartition

public CspConstraint eqPartition(CspSetVariable[] sources,
                                 CspSetVariable target,
                                 boolean advancedFilter)
Constraint representing partition( X, Y ) = Z that has more advanced filtering than the normal eqPartition constraint. Advanced filtering will reduce domains more than normal but takes longer to run.

Parameters:
sources - Array of sources that form the union constrained to have no common values
target - Target variable that is constrained to be equal to the union of the sources
advancedFilter - True if advanced filtering should be performed
Returns:
Partition constraint that can be added to solver

eqUnion

public CspConstraint eqUnion(CspSetVariable x,
                             CspSetVariable y,
                             CspSetVariable z)
Creates new union constraint representing union( X, Y ) = Z

Parameters:
x - First variable used to form union
y - Second variable used to form union
z - Target variable that is constrained to be equal to the union of the sources
Returns:
Union constraint that can be added to solver

eqUnion

public CspConstraint eqUnion(CspSetVariable[] sources,
                             CspSetVariable target)
Creates new union constraint representing union( sources ) = target

Parameters:
sources - Array of sources that form the union
target - Target variable that is constrained to be equal to the union of the sources
Returns:
Union constraint that can be added to solver

eqUnion

public CspConstraint eqUnion(CspSetVariable x,
                             CspSetVariable y,
                             CspSetVariable z,
                             CspSetVariable intersect)
Creates new union constraint that can utilize a variable that is the intersection of X and Y variables to further reduce the target Z than the normal eqUnion constraint.

Parameters:
x - First variable used to form union
y - Second variable used to form union
z - Target variable that is constrained to be equal to the union of the sources
intersect - This variable must be the intersection of X and Y for this constraint to work properly
Returns:
Union constraint that can be added to solver

eqUnion

public CspConstraint eqUnion(CspSetVariable[] sources,
                             CspSetVariable target,
                             boolean advancedFilter)
Creates new union constraint that will filter the domains more than the normal eqUnion constraint, but will take longer to run.

Parameters:
sources - Array of sources that form the union
target - Target variable that is constrained to be equal to the union of the sources
advancedFilter - True if advanced filtering should be performed
Returns:
Union constraint that can be added to solver

nullIntersection

public CspConstraint nullIntersection(CspSetVariable[] sources)
Creates new constraint representing null-intersection( sources )

Parameters:
sources - Array of variables that will share no common values
Returns:
Intersection constraint that can be added to solver

nullIntersection

public CspConstraint nullIntersection(CspSetVariable a,
                                      CspSetVariable b)
Creates new constraint representing null-intersection( A, B )

Parameters:
a - First set variable in constraint
b - Second set variable in constraint
Returns:
Constraint that will not allow A and B to have any common values

nullIntersection

public CspConstraint nullIntersection(CspSetVariable a,
                                      java.util.Set constb)
Creates new constraint representing null-intersection( A, b )

Parameters:
a - Set variable to constrain
constb - Constant set of values not allowed in variable a
Returns:
Constraint that will not allow A and b to have any common values

nullIntersection

public CspConstraint nullIntersection(java.util.Set consta,
                                      CspSetVariable b)
Creates new constraint representing null-intersection( a, B )

Parameters:
consta - Constant set of values not allowed in variable B
b - Set variable to constrain
Returns:
Constraint that will not allow a and B to have any common values

eqSubset

public CspConstraint eqSubset(CspSetVariable a,
                              CspSetVariable b)
Creates new constraint representing B is a subset of A

Parameters:
a - First set variable in constraint
b - Second set variable in constraint
Returns:
Constraint forcing B to be a subset of A

eqSubset

public CspConstraint eqSubset(java.util.Set a,
                              CspSetVariable b)
Creates new constraint representing B is a subset of a

Parameters:
a - Constant set in constraint
b - Second set variable in constraint
Returns:
Constraint forcing B to be a subset of a

eqSubset

public CspConstraint eqSubset(CspSetVariable a,
                              java.util.Set b)
Creates new constraint representing b is a subset of A

Parameters:
a - First set variable in constraint
b - Constant set in constraint
Returns:
Constraint forcing b to be a subset of A

strictSubset

public CspConstraint strictSubset(CspSetVariable a,
                                  CspSetVariable b)
Creates new constraint representing B is a strict subset of A

Parameters:
a - First set variable in constraint
b - Second set variable in constraint
Returns:
Constraint forcing B to be a strict subset of A

strictSubset

public CspConstraint strictSubset(java.util.Set a,
                                  CspSetVariable b)
Creates new constraint representing B is a strict subset of a

Parameters:
a - Constant set in constraint
b - Second set variable in constraint
Returns:
Constraint forcing B to be a strict subset of a

strictSubset

public CspConstraint strictSubset(CspSetVariable a,
                                  java.util.Set b)
Creates new constraint representing b is a strict subset of A

Parameters:
a - First set variable in constraint
b - Constant set in constraint
Returns:
Constraint forcing b to be a strict subset of A

memberOfSet

public CspConstraint memberOfSet(CspIntSetVariable set,
                                 CspIntExpr expr)
Constrains a numeric expression to be a member of a set. This function does not support generic expressions.


notMemberOfSet

public CspConstraint notMemberOfSet(CspIntSetVariable set,
                                    CspIntExpr expr)
Constrains a numeric expression to not be a member of a set. This function does not support generic expressions.