Google OR-Tools v9.11
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
SolutionPool.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.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
9package com.google.ortools.constraintsolver;
10
15public class SolutionPool extends BaseObject {
16 private transient long swigCPtr;
17
18 protected SolutionPool(long cPtr, boolean cMemoryOwn) {
19 super(mainJNI.SolutionPool_SWIGUpcast(cPtr), cMemoryOwn);
20 swigCPtr = cPtr;
21 }
22
23 protected static long getCPtr(SolutionPool obj) {
24 return (obj == null) ? 0 : obj.swigCPtr;
25 }
26
27 protected static long swigRelease(SolutionPool obj) {
28 long ptr = 0;
29 if (obj != null) {
30 if (!obj.swigCMemOwn)
31 throw new RuntimeException("Cannot release ownership as memory is not owned");
32 ptr = obj.swigCPtr;
33 obj.swigCMemOwn = false;
34 obj.delete();
35 }
36 return ptr;
37 }
38
39 @SuppressWarnings({"deprecation", "removal"})
40 protected void finalize() {
41 delete();
42 }
43
44 public synchronized void delete() {
45 if (swigCPtr != 0) {
46 if (swigCMemOwn) {
47 swigCMemOwn = false;
48 mainJNI.delete_SolutionPool(swigCPtr);
49 }
50 swigCPtr = 0;
51 }
52 super.delete();
53 }
54
59 public void initialize(Assignment assignment) {
60 mainJNI.SolutionPool_initialize(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
61 }
62
67 public void registerNewSolution(Assignment assignment) {
68 mainJNI.SolutionPool_registerNewSolution(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
69 }
70
75 public void getNextSolution(Assignment assignment) {
76 mainJNI.SolutionPool_getNextSolution(swigCPtr, this, Assignment.getCPtr(assignment), assignment);
77 }
78
83 public boolean syncNeeded(Assignment local_assignment) {
84 return mainJNI.SolutionPool_syncNeeded(swigCPtr, this, Assignment.getCPtr(local_assignment), local_assignment);
85 }
86
87}
boolean syncNeeded(Assignment local_assignment)
SolutionPool(long cPtr, boolean cMemoryOwn)