Java Reference

Java Reference

RegularLimit.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.2
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.constraintsolver;
10 
11 public class RegularLimit extends SearchLimit {
12  private transient long swigCPtr;
13 
14  protected RegularLimit(long cPtr, boolean cMemoryOwn) {
15  super(mainJNI.RegularLimit_SWIGUpcast(cPtr), cMemoryOwn);
16  swigCPtr = cPtr;
17  }
18 
19  protected static long getCPtr(RegularLimit obj) {
20  return (obj == null) ? 0 : obj.swigCPtr;
21  }
22 
23  @SuppressWarnings("deprecation")
24  protected void finalize() {
25  delete();
26  }
27 
28  public synchronized void delete() {
29  if (swigCPtr != 0) {
30  if (swigCMemOwn) {
31  swigCMemOwn = false;
32  mainJNI.delete_RegularLimit(swigCPtr);
33  }
34  swigCPtr = 0;
35  }
36  super.delete();
37  }
38 
39  public RegularLimit(Solver s, SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative) {
40  this(mainJNI.new_RegularLimit(Solver.getCPtr(s), s, SWIGTYPE_p_absl__Duration.getCPtr(time), branches, failures, solutions, smart_time_check, cumulative), true);
41  }
42 
43  public void copy(SearchLimit limit) {
44  mainJNI.RegularLimit_copy(swigCPtr, this, SearchLimit.getCPtr(limit), limit);
45  }
46 
48  long cPtr = mainJNI.RegularLimit_makeClone(swigCPtr, this);
49  return (cPtr == 0) ? null : new SearchLimit(cPtr, false);
50  }
51 
53  long cPtr = mainJNI.RegularLimit_MakeIdenticalClone(swigCPtr, this);
54  return (cPtr == 0) ? null : new RegularLimit(cPtr, false);
55  }
56 
57  public boolean check() {
58  return mainJNI.RegularLimit_check(swigCPtr, this);
59  }
60 
61  public void init() {
62  mainJNI.RegularLimit_init(swigCPtr, this);
63  }
64 
65  public void exitSearch() {
66  mainJNI.RegularLimit_exitSearch(swigCPtr, this);
67  }
68 
69  public void UpdateLimits(long time, long branches, long failures, long solutions) {
70  mainJNI.RegularLimit_UpdateLimits(swigCPtr, this, time, branches, failures, solutions);
71  }
72 
73  public long wall_time() {
74  return mainJNI.RegularLimit_wall_time(swigCPtr, this);
75  }
76 
77  public long branches() {
78  return mainJNI.RegularLimit_branches(swigCPtr, this);
79  }
80 
81  public long failures() {
82  return mainJNI.RegularLimit_failures(swigCPtr, this);
83  }
84 
85  public long solutions() {
86  return mainJNI.RegularLimit_solutions(swigCPtr, this);
87  }
88 
90  return mainJNI.RegularLimit_IsUncheckedSolutionLimitReached(swigCPtr, this);
91  }
92 
93  public int progressPercent() {
94  return mainJNI.RegularLimit_progressPercent(swigCPtr, this);
95  }
96 
97  public String toString() {
98  return mainJNI.RegularLimit_toString(swigCPtr, this);
99  }
100 
101  public void accept(ModelVisitor visitor) {
102  mainJNI.RegularLimit_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
103  }
104 
105 }
SearchLimit makeClone()
void copy(SearchLimit limit)
long wall_time()
RegularLimit MakeIdenticalClone()
int progressPercent()
SearchLimit(long cPtr, boolean cMemoryOwn)
void accept(ModelVisitor visitor)
boolean IsUncheckedSolutionLimitReached()
String toString()
long failures()
long branches()
boolean check()
void exitSearch()
RegularLimit(long cPtr, boolean cMemoryOwn)
void init()
RegularLimit(Solver s, SWIGTYPE_p_absl__Duration time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative)
void UpdateLimits(long time, long branches, long failures, long solutions)
long solutions()
Definition: Solver.java:54