java.lang.Object
org.maxicp.cp.engine.core.CPNodeVarViewFlip
- All Implemented Interfaces:
CPNodeVar
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionintfillInsert(int[] dest) Fills an array with the insertions of the node.intfillPred(int[] dest) Copies the predecessors into an array.intCopies the predecessors matching a status into an array.intfillSucc(int[] dest) Copies the successors matching a status into an array.intCopies the successors matching a status into an array.Returns the sequence variable to which this variable is related to.Returns the solver in which this variable was created.booleanTells if the node is matching a status.Gives a boolean variable telling if the node is requiredintnInsert()Returns the number of insertions of the node.intnode()Returns the node related to this variable.intnPred()Returns the number of predecessors.intnSucc()Returns the number of successors.voidAsks thatCPConstraint.propagate()is called whenever the node is excluded.voidAsks thatCPConstraint.propagate()is called whenever the node is inserted.voidAsks thatCPConstraint.propagate()is called whenever an insertion for the node is removed.voidAsks thatCPConstraint.propagate()is called whenever the node is required.voidAsks that the closure is called whenever the node is excluded.voidAsks that the closure is called whenever the node is inserted.voidAsks that the closure is called whenever the an insertion for the node has been removedvoidAsks that the closure is called the node is required.
-
Constructor Details
-
CPNodeVarViewFlip
-
-
Method Details
-
getSolver
Description copied from interface:CPNodeVarReturns the solver in which this variable was created. -
getSeqVar
Description copied from interface:CPNodeVarReturns the sequence variable to which this variable is related to. -
node
public int node()Description copied from interface:CPNodeVarReturns the node related to this variable. -
isNode
Description copied from interface:CPNodeVarTells if the node is matching a status. -
isRequired
Description copied from interface:CPNodeVarGives a boolean variable telling if the node is required- Specified by:
isRequiredin interfaceCPNodeVar- Returns:
- boolean variable telling if the node is required
-
fillPred
Description copied from interface:CPNodeVarCopies the predecessors matching a status into an array. -
fillPred
public int fillPred(int[] dest) Description copied from interface:CPNodeVarCopies the predecessors into an array. -
nPred
public int nPred()Description copied from interface:CPNodeVarReturns the number of predecessors. -
fillSucc
Description copied from interface:CPNodeVarCopies the successors matching a status into an array. -
fillSucc
public int fillSucc(int[] dest) Description copied from interface:CPNodeVarCopies the successors matching a status into an array. -
nSucc
public int nSucc()Description copied from interface:CPNodeVarReturns the number of successors. -
fillInsert
public int fillInsert(int[] dest) Description copied from interface:CPNodeVarFills an array with the insertions of the node. Equivalent tofillPred(node, dest, MEMBER).- Specified by:
fillInsertin interfaceCPNodeVar- Parameters:
dest- an array large enoughdest.length >= nInsert().- Returns:
- the number of insertions and
dest[0,...,nInsert()-1]contains the insertions in an arbitrary order.
-
nInsert
public int nInsert()Description copied from interface:CPNodeVarReturns the number of insertions of the node. -
whenInsert
Description copied from interface:CPNodeVarAsks that the closure is called whenever the node is inserted.- Specified by:
whenInsertin interfaceCPNodeVar- Parameters:
f- the closure.
-
whenExclude
Description copied from interface:CPNodeVarAsks that the closure is called whenever the node is excluded.- Specified by:
whenExcludein interfaceCPNodeVar- Parameters:
f- the closure.
-
whenRequire
Description copied from interface:CPNodeVarAsks that the closure is called the node is required.- Specified by:
whenRequirein interfaceCPNodeVar- Parameters:
f- the closure.
-
whenInsertRemoved
Description copied from interface:CPNodeVarAsks that the closure is called whenever the an insertion for the node has been removed- Specified by:
whenInsertRemovedin interfaceCPNodeVar- Parameters:
f- the closure
-
propagateOnInsert
Description copied from interface:CPNodeVarAsks thatCPConstraint.propagate()is called whenever the node is inserted. We say that an insert event occurs.- Specified by:
propagateOnInsertin interfaceCPNodeVar- Parameters:
c- the constraint for which theCPConstraint.propagate()method should be called on insert events of this variable.
-
propagateOnExclude
Description copied from interface:CPNodeVarAsks thatCPConstraint.propagate()is called whenever the node is excluded. We say that an exclude event occurs.- Specified by:
propagateOnExcludein interfaceCPNodeVar- Parameters:
c- the constraint for which theCPConstraint.propagate()method should be called on exclude events of this variable.
-
propagateOnRequire
Description copied from interface:CPNodeVarAsks thatCPConstraint.propagate()is called whenever the node is required. We say that an require event occurs.- Specified by:
propagateOnRequirein interfaceCPNodeVar- Parameters:
c- the constraint for which theCPConstraint.propagate()method should be called on require events of this variable.
-
propagateOnInsertRemoved
Description copied from interface:CPNodeVarAsks thatCPConstraint.propagate()is called whenever an insertion for the node is removed. We say that an removeInsert event occurs.- Specified by:
propagateOnInsertRemovedin interfaceCPNodeVar- Parameters:
c- the constraint for which theCPConstraint.propagate()method should be called on removeInsert events of this variable.
-