9 package com.google.ortools.sat;
12 private transient long swigCPtr;
15 protected SatHelper(
long cPtr,
boolean cMemoryOwn) {
21 return (obj ==
null) ? 0 : obj.swigCPtr;
24 @SuppressWarnings(
"deprecation")
29 public synchronized void delete() {
33 mainJNI.delete_SatHelper(swigCPtr);
40 byte[] buf = mainJNI.SatHelper_solve(model_proto.toByteArray());
41 if (buf ==
null || buf.length == 0) {
46 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
47 throw new RuntimeException(
48 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
53 byte[] buf = mainJNI.SatHelper_solveWithParameters(model_proto.toByteArray(), parameters.toByteArray());
54 if (buf ==
null || buf.length == 0) {
59 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
60 throw new RuntimeException(
61 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
66 byte[] buf = mainJNI.SatHelper_solveWithParametersAndSolutionCallback(model_proto.toByteArray(), parameters.toByteArray(),
SolutionCallback.
getCPtr(callback), callback);
67 if (buf ==
null || buf.length == 0) {
72 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
73 throw new RuntimeException(
74 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
79 return mainJNI.SatHelper_modelStats(model_proto.toByteArray());
83 return mainJNI.SatHelper_solverResponseStats(response.toByteArray());
87 return mainJNI.SatHelper_validateModel(model_proto.toByteArray());
91 this(mainJNI.new_SatHelper(),
true);