com.google.ortools.constraintsolver.OptimizeVar 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 OptimizeVar extends SearchMonitor {
private transient long swigCPtr;
protected OptimizeVar(long cPtr, boolean cMemoryOwn) {
super(mainJNI.OptimizeVar_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(OptimizeVar obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_OptimizeVar(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
public OptimizeVar(Solver s, boolean maximize, IntVar a, long step) {
this(mainJNI.new_OptimizeVar(Solver.getCPtr(s), s, maximize, IntVar.getCPtr(a), a, step), true);
}
public long best() {
return mainJNI.OptimizeVar_best(swigCPtr, this);
}
public IntVar var() {
long cPtr = mainJNI.OptimizeVar_var(swigCPtr, this);
return (cPtr == 0) ? null : new IntVar(cPtr, false);
}
public boolean acceptDelta(Assignment delta, Assignment deltadelta) {
return mainJNI.OptimizeVar_acceptDelta(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
}
public void enterSearch() {
mainJNI.OptimizeVar_enterSearch(swigCPtr, this);
}
public void beginNextDecision(DecisionBuilder db) {
mainJNI.OptimizeVar_beginNextDecision(swigCPtr, this, DecisionBuilder.getCPtr(db), db);
}
public void refuteDecision(Decision d) {
mainJNI.OptimizeVar_refuteDecision(swigCPtr, this, Decision.getCPtr(d), d);
}
public boolean atSolution() {
return mainJNI.OptimizeVar_atSolution(swigCPtr, this);
}
public boolean acceptSolution() {
return mainJNI.OptimizeVar_acceptSolution(swigCPtr, this);
}
public String print() {
return mainJNI.OptimizeVar_print(swigCPtr, this);
}
public String toString() {
return mainJNI.OptimizeVar_toString(swigCPtr, this);
}
public void accept(ModelVisitor visitor) {
mainJNI.OptimizeVar_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
}
public void applyBound() {
mainJNI.OptimizeVar_applyBound(swigCPtr, this);
}
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy