Class SequenceVarLocalSearchOperatorTemplate
java.lang.Object
com.google.ortools.constraintsolver.BaseObject
com.google.ortools.constraintsolver.LocalSearchOperator
com.google.ortools.constraintsolver.SequenceVarLocalSearchOperatorTemplate
- Direct Known Subclasses:
SequenceVarLocalSearchOperator
Base operator class for operators manipulating variables.
-
Field Summary
Fields inherited from class com.google.ortools.constraintsolver.BaseObject
swigCMemOwn -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedSequenceVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn) -
Method Summary
Modifier and TypeMethodDescriptionvoidactivate(long index) booleanactivated(long index) voidaddVars(SequenceVar[] vars) voiddeactivate(long index) voiddelete()protected voidfinalize()protected static longbooleanbooleanint[]oldValue(long index) voidonStart()Called by Start() after synchronizing the operator with the current
assignment.voidsetValue(long index, int[] value) intsize()int[]value(long index) Returns the value in the current assignment of the variable of given
index.var(long index) Returns the variable of given index.Methods inherited from class com.google.ortools.constraintsolver.LocalSearchOperator
getCPtr, HasFragments, nextNeighbor, reset, start, swigDirectorDisconnect, swigReleaseOwnership, swigTakeOwnershipMethods inherited from class com.google.ortools.constraintsolver.BaseObject
getCPtr, toString
-
Constructor Details
-
SequenceVarLocalSearchOperatorTemplate
protected SequenceVarLocalSearchOperatorTemplate(long cPtr, boolean cMemoryOwn)
-
-
Method Details
-
getCPtr
-
finalize
protected void finalize()- Overrides:
finalizein classLocalSearchOperator
-
delete
public void delete()- Overrides:
deletein classLocalSearchOperator
-
HoldsDelta
public boolean HoldsDelta()- Overrides:
HoldsDeltain classLocalSearchOperator
-
isIncremental
public boolean isIncremental() -
size
public int size() -
value
public int[] value(long index) Returns the value in the current assignment of the variable of given
index. -
var
Returns the variable of given index. -
oldValue
public int[] oldValue(long index) -
setValue
public void setValue(long index, int[] value) -
activated
public boolean activated(long index) -
activate
public void activate(long index) -
deactivate
public void deactivate(long index) -
addVars
-
onStart
public void onStart()Called by Start() after synchronizing the operator with the current
assignment. Should be overridden instead of Start() to avoid calling
VarLocalSearchOperator::Start explicitly.
-