Java Reference

Java Reference

CpSatHelper.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 
12 
13 public class CpSatHelper {
14  private transient long swigCPtr;
15  protected transient boolean swigCMemOwn;
16 
17  public CpSatHelper(long cPtr, boolean cMemoryOwn) {
18  swigCMemOwn = cMemoryOwn;
19  swigCPtr = cPtr;
20  }
21 
22  protected static long getCPtr(CpSatHelper obj) {
23  return (obj == null) ? 0 : obj.swigCPtr;
24  }
25 
26  @SuppressWarnings("deprecation")
27  protected void finalize() {
28  delete();
29  }
30 
31  public synchronized void delete() {
32  if (swigCPtr != 0) {
33  if (swigCMemOwn) {
34  swigCMemOwn = false;
35  mainJNI.delete_CpSatHelper(swigCPtr);
36  }
37  swigCPtr = 0;
38  }
39  }
40 
41  public static String modelStats(com.google.ortools.sat.CpModelProto model_proto) {
42  return mainJNI.CpSatHelper_modelStats(model_proto.toByteArray());
43  }
44 
45  public static String solverResponseStats(com.google.ortools.sat.CpSolverResponse response) {
46  return mainJNI.CpSatHelper_solverResponseStats(response.toByteArray());
47  }
48 
49  public static String validateModel(com.google.ortools.sat.CpModelProto model_proto) {
50  return mainJNI.CpSatHelper_validateModel(model_proto.toByteArray());
51  }
52 
54  return new Domain(mainJNI.CpSatHelper_variableDomain(variable_proto.toByteArray()), true);
55  }
56 
57  public static boolean writeModelToFile(com.google.ortools.sat.CpModelProto model_proto, String filename) {
58  return mainJNI.CpSatHelper_writeModelToFile(model_proto.toByteArray(), filename);
59  }
60 
61  public CpSatHelper() {
62  this(mainJNI.new_CpSatHelper(), true);
63  }
64 
65 }
static String modelStats(com.google.ortools.sat.CpModelProto model_proto)
static boolean writeModelToFile(com.google.ortools.sat.CpModelProto model_proto, String filename)
static String solverResponseStats(com.google.ortools.sat.CpSolverResponse response)
static String validateModel(com.google.ortools.sat.CpModelProto model_proto)
static Domain variableDomain(com.google.ortools.sat.IntegerVariableProto variable_proto)
We call domain any subset of Int64 = [kint64min, kint64max].
Definition: Domain.java:21
CpSatHelper(long cPtr, boolean cMemoryOwn)