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.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.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, long time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative) {
40  this(mainJNI.new_RegularLimit(Solver.getCPtr(s), s, 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 SWIGTYPE_p_absl__Duration duration_limit() {
74  return new SWIGTYPE_p_absl__Duration(mainJNI.RegularLimit_duration_limit(swigCPtr, this), true);
75  }
76 
77  public long wall_time() {
78  return mainJNI.RegularLimit_wall_time(swigCPtr, this);
79  }
80 
81  public long branches() {
82  return mainJNI.RegularLimit_branches(swigCPtr, this);
83  }
84 
85  public long failures() {
86  return mainJNI.RegularLimit_failures(swigCPtr, this);
87  }
88 
89  public long solutions() {
90  return mainJNI.RegularLimit_solutions(swigCPtr, this);
91  }
92 
94  return mainJNI.RegularLimit_IsUncheckedSolutionLimitReached(swigCPtr, this);
95  }
96 
97  public int progressPercent() {
98  return mainJNI.RegularLimit_progressPercent(swigCPtr, this);
99  }
100 
101  public String toString() {
102  return mainJNI.RegularLimit_toString(swigCPtr, this);
103  }
104 
105  public SWIGTYPE_p_absl__Time AbsoluteSolverDeadline() {
106  return new SWIGTYPE_p_absl__Time(mainJNI.RegularLimit_AbsoluteSolverDeadline(swigCPtr, this), true);
107  }
108 
109  public void accept(ModelVisitor visitor) {
110  mainJNI.RegularLimit_accept(swigCPtr, this, ModelVisitor.getCPtr(visitor), visitor);
111  }
112 
113 }
SWIGTYPE_p_absl__Duration duration_limit()
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()
SWIGTYPE_p_absl__Time AbsoluteSolverDeadline()
RegularLimit(Solver s, long time, long branches, long failures, long solutions, boolean smart_time_check, boolean cumulative)
long failures()
long branches()
boolean check()
void exitSearch()
RegularLimit(long cPtr, boolean cMemoryOwn)
void init()
void UpdateLimits(long time, long branches, long failures, long solutions)
long solutions()
Definition: Solver.java:54