public class DomainStructure extends Object implements VarHandler
Arcs can be associated to sub-domains of the structure variable. The state of the arc is said to be active if the variable takes a value from its sub-domain and it is inactive otherwise.
Modifier and Type | Class and Description |
---|---|
static class |
DomainStructure.Behavior |
Modifier and Type | Field and Description |
---|---|
Arc[] |
arcs |
DomainStructure.Behavior |
behavior |
IntDomain[] |
domains |
int |
notGrounded |
IntVar |
variable |
Constructor and Description |
---|
DomainStructure(IntVar variable,
IntDomain[] domains,
Arc[] arcs) |
DomainStructure(IntVar variable,
IntDomain[] domains,
Arc[] arcs,
DomainStructure.Behavior behavior) |
DomainStructure(IntVar variable,
List<Domain> domList,
List<Arc> arcList)
Creates an S-variable
|
Modifier and Type | Method and Description |
---|---|
int |
getPruningEvent(Var var)
Retrieves the consistency pruning event of a handler variable that causes
the handler to be reevaluated.
|
boolean |
isGrounded(int arcID) |
List<IntVar> |
listVariables() |
void |
processEvent(IntVar variable,
MutableNetwork network)
Informs the handler that one of its variable has changed and asks the
handler to update the state of the network accordingly.
|
void |
ungroundArc(int arcID) |
public final IntVar variable
public final Arc[] arcs
public final IntDomain[] domains
public final DomainStructure.Behavior behavior
public int notGrounded
public DomainStructure(IntVar variable, List<Domain> domList, List<Arc> arcList)
variable
- variable to create fordomList
- list of domainsarcList
- list of arcspublic DomainStructure(IntVar variable, IntDomain[] domains, Arc[] arcs, DomainStructure.Behavior behavior)
public void processEvent(IntVar variable, MutableNetwork network)
VarHandler
processEvent
in interface VarHandler
variable
- the variable that changednetwork
- the networkpublic void ungroundArc(int arcID)
public List<IntVar> listVariables()
listVariables
in interface VarHandler
public boolean isGrounded(int arcID)
public int getPruningEvent(Var var)
VarHandler
getPruningEvent
in interface VarHandler
var
- a handler variableCopyright © 2022. All rights reserved.