Google OR-Tools v9.9
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SearchLimit.java
Go to the documentation of this file.
1/* ----------------------------------------------------------------------------
2 * This file was automatically generated by SWIG (https://www.swig.org).
3 * Version 4.2.0
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
9package com.google.ortools.constraintsolver;
10
14public class SearchLimit extends SearchMonitor {
15 private transient long swigCPtr;
16
17 protected SearchLimit(long cPtr, boolean cMemoryOwn) {
18 super(mainJNI.SearchLimit_SWIGUpcast(cPtr), cMemoryOwn);
19 swigCPtr = cPtr;
20 }
21
22 protected static long getCPtr(SearchLimit obj) {
23 return (obj == null) ? 0 : obj.swigCPtr;
24 }
25
26 protected static long swigRelease(SearchLimit obj) {
27 long ptr = 0;
28 if (obj != null) {
29 if (!obj.swigCMemOwn)
30 throw new RuntimeException("Cannot release ownership as memory is not owned");
31 ptr = obj.swigCPtr;
32 obj.swigCMemOwn = false;
33 obj.delete();
34 }
35 return ptr;
36 }
37
38 @SuppressWarnings({"deprecation", "removal"})
39 protected void finalize() {
40 delete();
41 }
42
43 public synchronized void delete() {
44 if (swigCPtr != 0) {
45 if (swigCMemOwn) {
46 swigCMemOwn = false;
47 mainJNI.delete_SearchLimit(swigCPtr);
48 }
49 swigCPtr = 0;
50 }
51 super.delete();
52 }
53
55
59 public boolean crossed() {
60 return mainJNI.SearchLimit_crossed(swigCPtr, this);
61 }
62
69 public boolean check() {
70 return mainJNI.SearchLimit_check(swigCPtr, this);
71 }
72
77 public boolean CheckWithOffset(SWIGTYPE_p_absl__Duration offset) {
78 return mainJNI.SearchLimit_CheckWithOffset(swigCPtr, this, SWIGTYPE_p_absl__Duration.getCPtr(offset));
79 }
80
84 public void init() {
85 mainJNI.SearchLimit_init(swigCPtr, this);
86 }
87
92 public void copy(SearchLimit limit) {
93 mainJNI.SearchLimit_copy(swigCPtr, this, SearchLimit.getCPtr(limit), limit);
94 }
95
100 long cPtr = mainJNI.SearchLimit_makeClone(swigCPtr, this);
101 return (cPtr == 0) ? null : new SearchLimit(cPtr, false);
102 }
103
107 public void enterSearch() {
108 mainJNI.SearchLimit_enterSearch(swigCPtr, this);
109 }
110
112 try {
113 mainJNI.SearchLimit_beginNextDecision(swigCPtr, this, DecisionBuilder.getCPtr(b), b);
114 } finally {
116 }
117 }
118
119 public void periodicCheck() {
120 mainJNI.SearchLimit_periodicCheck(swigCPtr, this);
121 }
122
123 public void refuteDecision(Decision d) {
124 mainJNI.SearchLimit_refuteDecision(swigCPtr, this, Decision.getCPtr(d), d);
125 }
126
127 public String toString() {
128 return mainJNI.SearchLimit_toString(swigCPtr, this);
129 }
130
131 public void install() {
132 mainJNI.SearchLimit_install(swigCPtr, this);
133 }
134
135}
SearchLimit(long cPtr, boolean cMemoryOwn)
boolean CheckWithOffset(SWIGTYPE_p_absl__Duration offset)