choco.cp.solver.constraints.strong
Class SCConstraint

java.lang.Object
  extended by choco.cp.solver.constraints.strong.SCConstraint
Direct Known Subclasses:
AbstractMaxRPCConstraint

public class SCConstraint
extends Object

This class provides a skeletal implementation of the MyConstraint interface, to minimize the effort required to implement this interface.

Author:
vion

Field Summary
protected  SCVariable[] scope
          Scope of the constraint
 
Constructor Summary
SCConstraint(ISpecializedConstraint sConstraint, Map<IntDomainVar,SCVariable> pool)
           
 
Method Summary
 boolean check(int[] tuple)
           
 int firstSupport(int position, int value)
           
 int getArity()
           
 SConstraint getSConstraint()
           
 SCVariable<? extends SCConstraint> getVariable(int position)
           
 int getWeight()
           
 void increaseWeight()
           
 int nextSupport(int position, int value, int lastSupport)
           
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

scope

protected final SCVariable[] scope
Scope of the constraint

Constructor Detail

SCConstraint

public SCConstraint(ISpecializedConstraint sConstraint,
                    Map<IntDomainVar,SCVariable> pool)
Parameters:
sConstraint - Contrainte encapsulée
pool - Map de contraintes entre IntDomainVar et MyVariable pour faire la correspondance dans MyConstraint
Method Detail

check

public final boolean check(int[] tuple)

firstSupport

public int firstSupport(int position,
                        int value)

nextSupport

public int nextSupport(int position,
                       int value,
                       int lastSupport)

getVariable

public SCVariable<? extends SCConstraint> getVariable(int position)

getArity

public int getArity()

toString

public String toString()
Overrides:
toString in class Object

getWeight

public int getWeight()

increaseWeight

public void increaseWeight()

getSConstraint

public SConstraint getSConstraint()


Copyright © 2012. All Rights Reserved.