choco.cp.solver.constraints.integer.extension
Class ValidityChecker

java.lang.Object
  extended by choco.cp.solver.constraints.integer.extension.ValidityChecker
Direct Known Subclasses:
FastBooleanValidityChecker, FastValidityChecker

public class ValidityChecker
extends Object

A simple class that provides a method to check if a given tuple is valid i.e. if it is ok regarding the current domain of the variables


Nested Class Summary
static class ValidityChecker.VarComparator
          Sort the variables by domain size
 
Field Summary
protected  int arity
           
protected  HashMap<IntDomainVar,Integer> mapinit
           
static int nbCheck
           
protected  int[] position
           
protected  IntDomainVar[] sortedvs
           
protected  ValidityChecker.VarComparator vcomp
           
 
Constructor Summary
ValidityChecker(int ari, IntDomainVar[] vars)
           
 
Method Summary
 boolean isValid(int[] tuple)
           
 boolean isValid(int[] tuple, int i)
           
 void sortvars()
          Sort the variable to speedup the check
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

nbCheck

public static int nbCheck

sortedvs

protected IntDomainVar[] sortedvs

position

protected int[] position

mapinit

protected HashMap<IntDomainVar,Integer> mapinit

vcomp

protected ValidityChecker.VarComparator vcomp

arity

protected int arity
Constructor Detail

ValidityChecker

public ValidityChecker(int ari,
                       IntDomainVar[] vars)
Method Detail

sortvars

public void sortvars()
Sort the variable to speedup the check


isValid

public boolean isValid(int[] tuple)

isValid

public boolean isValid(int[] tuple,
                       int i)


Copyright © 2012. All Rights Reserved.