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.
-
-
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
All Methods Static Methods Instance Methods Concrete Methods 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()protected static longswigRelease(PropagationBaseObject obj)java.lang.StringtoString()voidunfreezeQueue()This method unfreezes the propagation queue.-
Methods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, swigRelease
-
-
-
-
Constructor Detail
-
PropagationBaseObject
protected PropagationBaseObject(long cPtr, boolean cMemoryOwn)
-
PropagationBaseObject
public PropagationBaseObject(Solver s)
-
-
Method Detail
-
getCPtr
protected static long getCPtr(PropagationBaseObject obj)
-
swigRelease
protected static long swigRelease(PropagationBaseObject obj)
-
finalize
protected void finalize()
- Overrides:
finalizein classBaseObject
-
delete
public void delete()
- Overrides:
deletein classBaseObject
-
toString
public java.lang.String toString()
- Overrides:
toStringin classBaseObject
-
solver
public Solver 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
public void enqueueDelayedDemon(Demon d)
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
public void enqueueVar(Demon d)
-
reset_action_on_fail
public void reset_action_on_fail()
This method clears the failure callback.
-
set_variable_to_clean_on_fail
public void set_variable_to_clean_on_fail(IntVar v)
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.
-
-