com.google.ortools.constraintsolver.SearchMonitor 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 SearchMonitor extends BaseObject {
private transient long swigCPtr;
protected SearchMonitor(long cPtr, boolean cMemoryOwn) {
super(mainJNI.SearchMonitor_SWIGUpcast(cPtr), cMemoryOwn);
swigCPtr = cPtr;
}
protected static long getCPtr(SearchMonitor obj) {
return (obj == null) ? 0 : obj.swigCPtr;
}
protected void finalize() {
delete();
}
public synchronized void delete() {
if (swigCPtr != 0) {
if (swigCMemOwn) {
swigCMemOwn = false;
mainJNI.delete_SearchMonitor(swigCPtr);
}
swigCPtr = 0;
}
super.delete();
}
protected void swigDirectorDisconnect() {
swigCMemOwn = false;
delete();
}
public void swigReleaseOwnership() {
swigCMemOwn = false;
mainJNI.SearchMonitor_change_ownership(this, swigCPtr, false);
}
public void swigTakeOwnership() {
swigCMemOwn = true;
mainJNI.SearchMonitor_change_ownership(this, swigCPtr, true);
}
public SearchMonitor(Solver s) {
this(mainJNI.new_SearchMonitor(Solver.getCPtr(s), s), true);
mainJNI.SearchMonitor_director_connect(this, swigCPtr, swigCMemOwn, true);
}
public void enterSearch() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_enterSearch(swigCPtr, this); else mainJNI.SearchMonitor_enterSearchSwigExplicitSearchMonitor(swigCPtr, this);
}
public void restartSearch() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_restartSearch(swigCPtr, this); else mainJNI.SearchMonitor_restartSearchSwigExplicitSearchMonitor(swigCPtr, this);
}
public void exitSearch() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_exitSearch(swigCPtr, this); else mainJNI.SearchMonitor_exitSearchSwigExplicitSearchMonitor(swigCPtr, this);
}
public void beginNextDecision(DecisionBuilder b) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_beginNextDecision(swigCPtr, this, DecisionBuilder.getCPtr(b), b); else mainJNI.SearchMonitor_beginNextDecisionSwigExplicitSearchMonitor(swigCPtr, this, DecisionBuilder.getCPtr(b), b);
}
public void endNextDecision(DecisionBuilder b, Decision d) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_endNextDecision(swigCPtr, this, DecisionBuilder.getCPtr(b), b, Decision.getCPtr(d), d); else mainJNI.SearchMonitor_endNextDecisionSwigExplicitSearchMonitor(swigCPtr, this, DecisionBuilder.getCPtr(b), b, Decision.getCPtr(d), d);
}
public void applyDecision(Decision d) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_applyDecision(swigCPtr, this, Decision.getCPtr(d), d); else mainJNI.SearchMonitor_applyDecisionSwigExplicitSearchMonitor(swigCPtr, this, Decision.getCPtr(d), d);
}
public void refuteDecision(Decision d) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_refuteDecision(swigCPtr, this, Decision.getCPtr(d), d); else mainJNI.SearchMonitor_refuteDecisionSwigExplicitSearchMonitor(swigCPtr, this, Decision.getCPtr(d), d);
}
public void afterDecision(Decision d, boolean apply) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_afterDecision(swigCPtr, this, Decision.getCPtr(d), d, apply); else mainJNI.SearchMonitor_afterDecisionSwigExplicitSearchMonitor(swigCPtr, this, Decision.getCPtr(d), d, apply);
}
public void beginFail() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_beginFail(swigCPtr, this); else mainJNI.SearchMonitor_beginFailSwigExplicitSearchMonitor(swigCPtr, this);
}
public void endFail() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_endFail(swigCPtr, this); else mainJNI.SearchMonitor_endFailSwigExplicitSearchMonitor(swigCPtr, this);
}
public void beginInitialPropagation() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_beginInitialPropagation(swigCPtr, this); else mainJNI.SearchMonitor_beginInitialPropagationSwigExplicitSearchMonitor(swigCPtr, this);
}
public void endInitialPropagation() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_endInitialPropagation(swigCPtr, this); else mainJNI.SearchMonitor_endInitialPropagationSwigExplicitSearchMonitor(swigCPtr, this);
}
public boolean acceptSolution() {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_acceptSolution(swigCPtr, this) : mainJNI.SearchMonitor_acceptSolutionSwigExplicitSearchMonitor(swigCPtr, this);
}
public boolean atSolution() {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_atSolution(swigCPtr, this) : mainJNI.SearchMonitor_atSolutionSwigExplicitSearchMonitor(swigCPtr, this);
}
public void noMoreSolutions() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_noMoreSolutions(swigCPtr, this); else mainJNI.SearchMonitor_noMoreSolutionsSwigExplicitSearchMonitor(swigCPtr, this);
}
public boolean localOptimum() {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_localOptimum(swigCPtr, this) : mainJNI.SearchMonitor_localOptimumSwigExplicitSearchMonitor(swigCPtr, this);
}
public boolean acceptDelta(Assignment delta, Assignment deltadelta) {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_acceptDelta(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta) : mainJNI.SearchMonitor_acceptDeltaSwigExplicitSearchMonitor(swigCPtr, this, Assignment.getCPtr(delta), delta, Assignment.getCPtr(deltadelta), deltadelta);
}
public void acceptNeighbor() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_acceptNeighbor(swigCPtr, this); else mainJNI.SearchMonitor_acceptNeighborSwigExplicitSearchMonitor(swigCPtr, this);
}
public void AcceptUncheckedNeighbor() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_AcceptUncheckedNeighbor(swigCPtr, this); else mainJNI.SearchMonitor_AcceptUncheckedNeighborSwigExplicitSearchMonitor(swigCPtr, this);
}
public boolean IsUncheckedSolutionLimitReached() {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_IsUncheckedSolutionLimitReached(swigCPtr, this) : mainJNI.SearchMonitor_IsUncheckedSolutionLimitReachedSwigExplicitSearchMonitor(swigCPtr, this);
}
public Solver solver() {
long cPtr = mainJNI.SearchMonitor_solver(swigCPtr, this);
return (cPtr == 0) ? null : new Solver(cPtr, false);
}
public void periodicCheck() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_periodicCheck(swigCPtr, this); else mainJNI.SearchMonitor_periodicCheckSwigExplicitSearchMonitor(swigCPtr, this);
}
public int progressPercent() {
return (getClass() == SearchMonitor.class) ? mainJNI.SearchMonitor_progressPercent(swigCPtr, this) : mainJNI.SearchMonitor_progressPercentSwigExplicitSearchMonitor(swigCPtr, this);
}
public void accept(ModelVisitor visitor) {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor); else mainJNI.SearchMonitor_acceptSwigExplicitSearchMonitor(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
}
public void install() {
if (getClass() == SearchMonitor.class) mainJNI.SearchMonitor_install(swigCPtr, this); else mainJNI.SearchMonitor_installSwigExplicitSearchMonitor(swigCPtr, this);
}
public final static int kNoProgress = mainJNI.SearchMonitor_kNoProgress_get();
}
© 2015 - 2025 Weber Informatics LLC | Privacy Policy