parser.absconparseur.components
Class PConstraint
java.lang.Object
parser.absconparseur.components.PConstraint
- Direct Known Subclasses:
- PExtensionConstraint, PGlobalConstraint, PIntensionConstraint
public abstract class PConstraint
- extends Object
LOGGER
protected static final Logger LOGGER
name
protected String name
scope
protected PVariable[] scope
chocoCstr
protected Constraint chocoCstr
PConstraint
public PConstraint(String name,
PVariable[] scope)
getName
public String getName()
getScope
public PVariable[] getScope()
getPositionInScope
public int getPositionInScope(PVariable variable)
getArity
public int getArity()
getMaximalCost
public int getMaximalCost()
computeCostOf
public abstract long computeCostOf(int[] tuple)
- For CSP, returns 0 is the constraint is satified and 1 if the constraint is violated.
For WCSP, returns the cost for the given tuple.
toString
public String toString()
- Overrides:
toString
in class Object
isGuaranteedToBeDivisionByZeroFree
public boolean isGuaranteedToBeDivisionByZeroFree()
isGuaranteedToBeOverflowFree
public boolean isGuaranteedToBeOverflowFree()
getChocoCstr
public Constraint getChocoCstr()
setChocoCstr
public void setChocoCstr(Constraint chocoCstr)
hashCode
public int hashCode()
- Overrides:
hashCode
in class Object
Copyright © 2012. All Rights Reserved.