Java Reference

Java Reference

SolutionCallback.java
Go to the documentation of this file.
1 /* ----------------------------------------------------------------------------
2  * This file was automatically generated by SWIG (http://www.swig.org).
3  * Version 4.0.1
4  *
5  * Do not make changes to this file unless you know what you are doing--modify
6  * the SWIG interface file instead.
7  * ----------------------------------------------------------------------------- */
8 
9 package com.google.ortools.sat;
10 
11 public class SolutionCallback {
12  private transient long swigCPtr;
13  protected transient boolean swigCMemOwn;
14 
15  public SolutionCallback(long cPtr, boolean cMemoryOwn) {
16  swigCMemOwn = cMemoryOwn;
17  swigCPtr = cPtr;
18  }
19 
20  protected static long getCPtr(SolutionCallback obj) {
21  return (obj == null) ? 0 : obj.swigCPtr;
22  }
23 
24  @SuppressWarnings("deprecation")
25  protected void finalize() {
26  delete();
27  }
28 
29  public synchronized void delete() {
30  if (swigCPtr != 0) {
31  if (swigCMemOwn) {
32  swigCMemOwn = false;
33  mainJNI.delete_SolutionCallback(swigCPtr);
34  }
35  swigCPtr = 0;
36  }
37  }
38 
39  protected void swigDirectorDisconnect() {
40  swigCMemOwn = false;
41  delete();
42  }
43 
44  public void swigReleaseOwnership() {
45  swigCMemOwn = false;
46  mainJNI.SolutionCallback_change_ownership(this, swigCPtr, false);
47  }
48 
49  public void swigTakeOwnership() {
50  swigCMemOwn = true;
51  mainJNI.SolutionCallback_change_ownership(this, swigCPtr, true);
52  }
53 
54  public void onSolutionCallback() {
55  mainJNI.SolutionCallback_onSolutionCallback(swigCPtr, this);
56  }
57 
58  public long numBooleans() {
59  return mainJNI.SolutionCallback_numBooleans(swigCPtr, this);
60  }
61 
62  public long numBranches() {
63  return mainJNI.SolutionCallback_numBranches(swigCPtr, this);
64  }
65 
66  public long numConflicts() {
67  return mainJNI.SolutionCallback_numConflicts(swigCPtr, this);
68  }
69 
70  public long numBinaryPropagations() {
71  return mainJNI.SolutionCallback_numBinaryPropagations(swigCPtr, this);
72  }
73 
74  public long numIntegerPropagations() {
75  return mainJNI.SolutionCallback_numIntegerPropagations(swigCPtr, this);
76  }
77 
78  public double wallTime() {
79  return mainJNI.SolutionCallback_wallTime(swigCPtr, this);
80  }
81 
82  public double userTime() {
83  return mainJNI.SolutionCallback_userTime(swigCPtr, this);
84  }
85 
86  public double objectiveValue() {
87  return mainJNI.SolutionCallback_objectiveValue(swigCPtr, this);
88  }
89 
90  public double bestObjectiveBound() {
91  return mainJNI.SolutionCallback_bestObjectiveBound(swigCPtr, this);
92  }
93 
94  public long solutionIntegerValue(int index) {
95  return mainJNI.SolutionCallback_solutionIntegerValue(swigCPtr, this, index);
96  }
97 
98  public boolean solutionBooleanValue(int index) {
99  return mainJNI.SolutionCallback_solutionBooleanValue(swigCPtr, this, index);
100  }
101 
102  public void stopSearch() {
103  mainJNI.SolutionCallback_stopSearch(swigCPtr, this);
104  }
105 
106  public SolutionCallback() {
107  this(mainJNI.new_SolutionCallback(), true);
108  mainJNI.SolutionCallback_director_connect(this, swigCPtr, true, true);
109  }
110 
111 }
long numConflicts()
long numBinaryPropagations()
void swigDirectorDisconnect()
void stopSearch()
long solutionIntegerValue(int index)
long numBooleans()
double userTime()
double bestObjectiveBound()
long numIntegerPropagations()
void swigTakeOwnership()
void swigReleaseOwnership()
long numBranches()
SolutionCallback(long cPtr, boolean cMemoryOwn)
double objectiveValue()
boolean solutionBooleanValue(int index)
double wallTime()
void onSolutionCallback()
SolutionCallback()