parser.absconparseur.components
Class PConstraint

java.lang.Object
  extended by parser.absconparseur.components.PConstraint
Direct Known Subclasses:
PExtensionConstraint, PGlobalConstraint, PIntensionConstraint

public abstract class PConstraint
extends Object


Field Summary
protected  Constraint chocoCstr
           
protected static Logger LOGGER
           
protected  String name
           
protected  PVariable[] scope
           
 
Constructor Summary
PConstraint(String name, PVariable[] scope)
           
 
Method Summary
abstract  long computeCostOf(int[] tuple)
          For CSP, returns 0 is the constraint is satified and 1 if the constraint is violated.
 int getArity()
           
 Constraint getChocoCstr()
           
 int getMaximalCost()
           
 String getName()
           
 int getPositionInScope(PVariable variable)
           
 PVariable[] getScope()
           
 int hashCode()
           
 boolean isGuaranteedToBeDivisionByZeroFree()
           
 boolean isGuaranteedToBeOverflowFree()
           
 void setChocoCstr(Constraint chocoCstr)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

LOGGER

protected static final Logger LOGGER

name

protected String name

scope

protected PVariable[] scope

chocoCstr

protected Constraint chocoCstr
Constructor Detail

PConstraint

public PConstraint(String name,
                   PVariable[] scope)
Method Detail

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.