|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectchoco.kernel.solver.propagation.Propagator
choco.kernel.solver.constraints.AbstractSConstraint<IntDomainVar>
choco.kernel.solver.constraints.integer.AbstractIntSConstraint
choco.kernel.solver.constraints.integer.AbstractLargeIntSConstraint
choco.cp.solver.constraints.global.regular.Regular
public final class Regular
Created by IntelliJ IDEA. User: Hadrien Enforce the sequence of variable vs to be a word recognized by DFA auto
Field Summary | |
---|---|
protected LightLayeredDFA |
autom
|
static boolean |
INCREMENTAL
|
protected BitSet |
mark
|
protected int |
nbNode
|
protected ArrayList<LightState>[] |
Ni
|
protected int[] |
offset
|
protected StoredIndexedBipartiteSet[] |
Qij
|
protected HashSet<IndexedObject>[] |
qijvalues
|
protected choco.cp.solver.constraints.global.regular.Regular.PropagationData |
sdata
Stored data structured map to the original automaton |
protected int[] |
sizes
|
protected int[] |
start
|
Fields inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
cIndices, constraintType, extensions, vars |
Fields inherited from class choco.kernel.solver.propagation.Propagator |
---|
active, constAwakeEvent, priority, propagationEngine |
Fields inherited from interface choco.kernel.solver.constraints.SConstraint |
---|
LOGGER |
Constructor Summary | |
---|---|
Regular(DFA auto,
IntDomainVar[] vs,
IEnvironment environment)
Enforce the sequence of variable vs to be a word recognized by DFA auto |
|
Regular(DFA auto,
IntDomainVar[] vs,
int[] lbs,
int[] dsize,
IEnvironment environment)
|
Method Summary | |
---|---|
void |
awake()
Propagation: Propagating the constraint for the very first time until local consistency is reached. |
void |
awakeOnRem(int idx,
int x)
Default propagation on one value removal: propagation on domain revision. |
void |
backward2OnLevel(int i)
|
void |
backwardOnLevel(int i)
|
void |
backwardUpdate()
Only consider states st that reached qn (which are on a path (st ~> qn)) |
void |
cleanUp()
removes values that are not supported by any state of the automata |
void |
decrement_indeg(LightState st,
int i)
Decrement the in-degree of state st located on the i-th layer |
void |
decrement_outdeg(LightState st,
int i)
Decrement the out-degree of state st located on the i-th layer |
void |
forwardOnLevel(int i)
|
void |
forwardUpdate()
Only consider states st that can be reached from q0 (which are on a path (qo ~> st)) |
int |
getFilteredEventMask(int idx)
|
StoredIndexedBipartiteSet |
getQij(int var,
int val)
|
void |
init(LightLayeredDFA auto,
int[] lbs,
int[] dsize,
IEnvironment environment)
|
void |
initData()
|
void |
initMarck()
marks allow to know whether a state is reachable from q_0 (during the forward phase) or whether a state can not reach q_n (during the backward phase). |
void |
initQij(ArrayList[] qijvalues)
|
boolean |
isSatisfied(int[] tuple)
TEMPORARY: if not overriden by the constraint, throws an error to avoid bug using reified constraints in constraints that have not been changed to fulfill this api yet ! |
String |
pretty()
pretty printing of the object. |
void |
propagate()
Propagation: Propagating the constraint until local consistency is reached. |
void |
propagateNullInDeg(LightState st,
int i)
|
void |
propagateNullOutDeg(LightState st,
int i)
|
void |
propagateRemoval(int i,
int j)
Incremental propagation of a value removal |
void |
prune(int i,
int val)
|
String |
toString()
|
Methods inherited from class choco.kernel.solver.constraints.integer.AbstractIntSConstraint |
---|
awakeOnBounds, awakeOnInf, awakeOnInst, awakeOnRemovals, awakeOnSup, getConstraintType, isConsistent, isSatisfied |
Methods inherited from class choco.kernel.solver.constraints.AbstractSConstraint |
---|
addExtension, addListener, clone, getAbstractSConstraintExtensionNumber, getConstraintIdx, getExtension, getFineDegree, getNbVarNotInst, getNbVars, getVar, getVarQuick, isCompletelyInstantiated, isEntailed, opposite, setConstraintIndex, setExtension, setVar |
Methods inherited from class choco.kernel.solver.propagation.Propagator |
---|
activate, constAwake, fail, getEvent, getPriority, isActive, setActive, setActiveSilently, setEntailed, setPassive, setPropagationEngine |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public static final boolean INCREMENTAL
protected StoredIndexedBipartiteSet[] Qij
protected int[] offset
protected int[] start
protected int[] sizes
protected LightLayeredDFA autom
protected int nbNode
protected choco.cp.solver.constraints.global.regular.Regular.PropagationData sdata
protected ArrayList<LightState>[] Ni
protected BitSet mark
protected HashSet<IndexedObject>[] qijvalues
Constructor Detail |
---|
public Regular(DFA auto, IntDomainVar[] vs, int[] lbs, int[] dsize, IEnvironment environment)
public Regular(DFA auto, IntDomainVar[] vs, IEnvironment environment)
auto
- vs
- environment
- Method Detail |
---|
public void init(LightLayeredDFA auto, int[] lbs, int[] dsize, IEnvironment environment)
public void initQij(ArrayList[] qijvalues)
public int getFilteredEventMask(int idx)
getFilteredEventMask
in class Propagator
public StoredIndexedBipartiteSet getQij(int var, int val)
public void initData()
public void initMarck()
public void forwardUpdate()
public void forwardOnLevel(int i)
public void backwardUpdate()
public void backwardOnLevel(int i)
public void backward2OnLevel(int i)
public void cleanUp() throws ContradictionException
ContradictionException
public void propagate() throws ContradictionException
Propagator
propagate
in class Propagator
ContradictionException
- contradiction exceptionpublic void prune(int i, int val) throws ContradictionException
i
- val
-
ContradictionException
public void awake() throws ContradictionException
Propagator
awake
in class Propagator
ContradictionException
- contradiction exceptionpublic void propagateRemoval(int i, int j) throws ContradictionException
ContradictionException
public void decrement_outdeg(LightState st, int i) throws ContradictionException
ContradictionException
public void propagateNullOutDeg(LightState st, int i) throws ContradictionException
ContradictionException
public void decrement_indeg(LightState st, int i) throws ContradictionException
ContradictionException
public void propagateNullInDeg(LightState st, int i) throws ContradictionException
ContradictionException
public void awakeOnRem(int idx, int x) throws ContradictionException
AbstractIntSConstraint
awakeOnRem
in interface IntPropagator
awakeOnRem
in class AbstractIntSConstraint
ContradictionException
public boolean isSatisfied(int[] tuple)
AbstractIntSConstraint
isSatisfied
in interface IntPropagator
isSatisfied
in class AbstractIntSConstraint
public String pretty()
IPretty
pretty
in interface IPretty
pretty
in class AbstractSConstraint<IntDomainVar>
public String toString()
toString
in class AbstractSConstraint<IntDomainVar>
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |