com.google.ortools.constraintsolver.LocalSearchOperator Maven / Gradle / Ivy
The newest version!
/* ----------------------------------------------------------------------------
* This file was automatically generated by SWIG (http://www.swig.org).
* Version 3.0.12
*
* Do not make changes to this file unless you know what you are doing--modify
* the SWIG interface file instead.
* ----------------------------------------------------------------------------- */
package com.google.ortools.constraintsolver;
public class LocalSearchOperator extends BaseObject {
private transient long swigCPtr;
protected LocalSearchOperator(long cPtr, boolean cMemoryOwn) {
super(mainJNI.LocalSearchOperator_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(LocalSearchOperator obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_LocalSearchOperator(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
mainJNI.LocalSearchOperator_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
mainJNI.LocalSearchOperator_change_ownership(this, swigCPtr, true);
}
public LocalSearchOperator() {
this(mainJNI.new_LocalSearchOperator(), true);
mainJNI.LocalSearchOperator_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public boolean nextNeighbor(Assignment delta, Assignment deltadelta) {
return mainJNI.LocalSearchOperator_nextNeighbor(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
}
public void start(Assignment assignment) {
mainJNI.LocalSearchOperator_start(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
}
public void reset() {
if (getClass() == LocalSearchOperator.class) mainJNI.LocalSearchOperator_reset(swigCPtr, this); else mainJNI.LocalSearchOperator_resetSwigExplicitLocalSearchOperator(swigCPtr, this);
}
public boolean HasFragments() {
return (getClass() == LocalSearchOperator.class) ? mainJNI.LocalSearchOperator_HasFragments(swigCPtr, this) : mainJNI.LocalSearchOperator_HasFragmentsSwigExplicitLocalSearchOperator(swigCPtr, this);
}
public boolean HoldsDelta() {
return (getClass() == LocalSearchOperator.class) ? mainJNI.LocalSearchOperator_HoldsDelta(swigCPtr, this) : mainJNI.LocalSearchOperator_HoldsDeltaSwigExplicitLocalSearchOperator(swigCPtr, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy