choco.cp.common.util.preprocessor
Class ExpressionTools

java.lang.Object
  extended by choco.cp.common.util.preprocessor.ExpressionTools

public final class ExpressionTools
extends Object

User : cprudhom
Mail : cprudhom(a)emn.fr
Date : 2 avr. 2010br/> Since : Choco 2.1.1
An class providing expression tools.


Nested Class Summary
static class ExpressionTools.SimplePrecedence
           
 
Method Summary
static boolean encompassDiff(ExpressionSConstraint ic)
           
static SConstraint getIntentionalConstraint(ExpressionSConstraint e, CPSolver s)
          If the expression can be matched to a known intensional constraint, then return it as a solver constraint *
static ExpressionTools.SimplePrecedence getPrecedenceConstraint(ExpressionSConstraint e)
           
static SConstraint getScalarConstraint(ExpressionSConstraint e, CPSolver s)
          Try to recognize that the expression is a scalar.
static boolean hasHolesWithinOneDomain(ExpressionSConstraint e, Configuration configuration)
          Is there at least one variable within the scope of e that has more than ratioHole % of holes in the domain ?
static boolean isVeryBinaryHeavy(ExpressionSConstraint e)
          Check if adding an ac scheme with residue will be heavy for this expression
static boolean toBeDecomposed(ExpressionSConstraint e)
          Advise decomposition above a threshold of arity and cartesian product
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getIntentionalConstraint

public static SConstraint getIntentionalConstraint(ExpressionSConstraint e,
                                                   CPSolver s)
If the expression can be matched to a known intensional constraint, then return it as a solver constraint *


getScalarConstraint

public static SConstraint getScalarConstraint(ExpressionSConstraint e,
                                              CPSolver s)
Try to recognize that the expression is a scalar.


getPrecedenceConstraint

public static ExpressionTools.SimplePrecedence getPrecedenceConstraint(ExpressionSConstraint e)

encompassDiff

public static boolean encompassDiff(ExpressionSConstraint ic)

hasHolesWithinOneDomain

public static boolean hasHolesWithinOneDomain(ExpressionSConstraint e,
                                              Configuration configuration)
Is there at least one variable within the scope of e that has more than ratioHole % of holes in the domain ?

Parameters:
e - expression
configuration -
Returns:
true if one of the variables has some holes

toBeDecomposed

public static boolean toBeDecomposed(ExpressionSConstraint e)
Advise decomposition above a threshold of arity and cartesian product

Parameters:
e -

isVeryBinaryHeavy

public static boolean isVeryBinaryHeavy(ExpressionSConstraint e)
Check if adding an ac scheme with residue will be heavy for this expression

Parameters:
e -
Returns:


Copyright © 2012. All Rights Reserved.