jopt.csp.spi.arcalgorithm.constraint.set
Class EqPartition

java.lang.Object
  extended byjopt.csp.spi.arcalgorithm.variable.VariableChangeBase
      extended byjopt.csp.spi.arcalgorithm.constraint.AbstractConstraint
          extended byjopt.csp.spi.arcalgorithm.constraint.set.SetConstraint
              extended byjopt.csp.spi.arcalgorithm.constraint.set.EqUnion
                  extended byjopt.csp.spi.arcalgorithm.constraint.set.EqPartition
All Implemented Interfaces:
jopt.csp.variable.CspConstraint, GraphConstraint, NumConstants, PostableConstraint, VariableChangeSource

public class EqPartition
extends EqUnion

Constraint representing partition( sources ) = target. This is similar to a union constraint except the source variables cannot share any common values.


Field Summary
 
Fields inherited from interface jopt.csp.spi.util.NumConstants
ADD, DIVIDE, DIVIDE_BY, DIVIDE_BY_CEIL, DIVIDE_BY_FLOOR, DIVIDE_CEIL, DIVIDE_FLOOR, DOUBLE, DOUBLE_NEG_INF, DOUBLE_POS_INF, DOUBLE_ZERO, EQ, FLOAT, FLOAT_NEG_INF, FLOAT_POS_INF, FLOAT_ZERO, GEQ, GT, HALF_PI, INTEGER, INTEGER_MAX, INTEGER_MIN, INTEGER_ZERO, LEQ, LONG, LONG_MAX, LONG_MIN, LONG_ZERO, LT, MULTIPLY, NEQ, ONE_AND_HALF_PI, PI, RANGE, SUBTRACT, SUBTRACT_FROM, TWO_PI
 
Constructor Summary
EqPartition(SetVariable[] sources, SetVariable target)
          Creates new partition constraint
EqPartition(SetVariable[] sources, SetVariable target, boolean advancedFilter)
          Creates new partition constraint that has more advanced filtering than normal
EqPartition(SetVariable x, SetVariable y, SetVariable z)
          Creates new partition constraint
EqPartition(SetVariable x, SetVariable y, SetVariable z, boolean advancedFilter)
          Creates new partition constraint that has more advanced filtering than normal
 
Methods inherited from class jopt.csp.spi.arcalgorithm.constraint.set.SetConstraint
addVariableChangeListener, getBooleanSourceArcs, getBooleanSourceNodes, isOverRealInterval, isViolated, postToGraph, removeVariableChangeListener
 
Methods inherited from class jopt.csp.spi.arcalgorithm.constraint.AbstractConstraint
associateToGraph, getGraphConstraintFragment, getPostableOpposite, isFalse, isTrue, toBoolean
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EqPartition

public EqPartition(SetVariable x,
                   SetVariable y,
                   SetVariable z)
Creates new partition constraint

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

EqPartition

public EqPartition(SetVariable[] sources,
                   SetVariable target)
Creates new partition constraint

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

EqPartition

public EqPartition(SetVariable x,
                   SetVariable y,
                   SetVariable z,
                   boolean advancedFilter)
Creates new partition constraint that has more advanced filtering than normal

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 which will reduce domains more than normal but takes longer to run

EqPartition

public EqPartition(SetVariable[] sources,
                   SetVariable target,
                   boolean advancedFilter)
Creates new partition constraint that has more advanced filtering than normal

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 which will reduce domains more than normal but takes longer to run