Class PropagationBaseObject
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.PropagationBaseObject
- Direct Known Subclasses:
Assignment,Constraint,IntervalVar,IntExpr,SequenceVar
public class PropagationBaseObject extends BaseObject
NOLINT
The PropagationBaseObject is a subclass of BaseObject that is also
friend to the Solver class. It allows accessing methods useful when
writing new constraints or new expressions.
The PropagationBaseObject is a subclass of BaseObject that is also
friend to the Solver class. It allows accessing methods useful when
writing new constraints or new expressions.
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
Constructors Modifier Constructor Description protectedPropagationBaseObject(long cPtr, boolean cMemoryOwn)PropagationBaseObject(Solver s) -
Method Summary
Modifier and Type Method Description java.lang.StringbaseName()Returns a base name for automatic naming.voiddelete()voidenqueueDelayedDemon(Demon d)This method pushes the demon onto the propagation queue.voidenqueueVar(Demon d)protected voidfinalize()voidfreezeQueue()This method freezes the propagation queue.protected static longgetCPtr(PropagationBaseObject obj)booleanhasName()Returns whether the object has been named or not.java.lang.Stringname()Object naming.voidreset_action_on_fail()This method clears the failure callback.voidset_variable_to_clean_on_fail(IntVar v)Shortcut for variable cleaner.voidsetName(java.lang.String name)Solversolver()java.lang.StringtoString()voidunfreezeQueue()This method unfreezes the propagation queue.Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtrMethods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Constructor Details
-
PropagationBaseObject
protected PropagationBaseObject(long cPtr, boolean cMemoryOwn) -
PropagationBaseObject
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classBaseObject
-
delete
public void delete()- Overrides:
deletein classBaseObject
-
toString
public java.lang.String toString()- Overrides:
toStringin classBaseObject
-
solver
-
freezeQueue
public void freezeQueue()This method freezes the propagation queue. It is useful when you
need to apply multiple modifications at once. -
unfreezeQueue
public void unfreezeQueue()This method unfreezes the propagation queue. All modifications
that happened when the queue was frozen will be processed. -
enqueueDelayedDemon
This method pushes the demon onto the propagation queue. It will
be processed directly if the queue is empty. It will be enqueued
according to its priority otherwise. -
enqueueVar
-
reset_action_on_fail
public void reset_action_on_fail()This method clears the failure callback. -
set_variable_to_clean_on_fail
Shortcut for variable cleaner. -
name
public java.lang.String name()Object naming. -
setName
public void setName(java.lang.String name) -
hasName
public boolean hasName()Returns whether the object has been named or not. -
baseName
public java.lang.String baseName()Returns a base name for automatic naming.
-