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;
28 public synchronized void delete() {
32 mainJNI.delete_SatHelper(swigCPtr);
39 byte[] buf = mainJNI.SatHelper_solve(model_proto.toByteArray());
40 if (buf ==
null || buf.length == 0) {
45 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
46 throw new RuntimeException(
47 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
52 byte[] buf = mainJNI.SatHelper_solveWithParameters(model_proto.toByteArray(), parameters.toByteArray());
53 if (buf ==
null || buf.length == 0) {
58 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
59 throw new RuntimeException(
60 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
65 byte[] buf = mainJNI.SatHelper_solveWithParametersAndSolutionCallback(model_proto.toByteArray(), parameters.toByteArray(),
SolutionCallback.
getCPtr(callback), callback);
66 if (buf ==
null || buf.length == 0) {
71 }
catch (
com.
google.protobuf.InvalidProtocolBufferException e) {
72 throw new RuntimeException(
73 "Unable to parse com.google.ortools.sat.CpSolverResponse protocol message.");
78 return mainJNI.SatHelper_modelStats(model_proto.toByteArray());
82 return mainJNI.SatHelper_solverResponseStats(response.toByteArray());
86 return mainJNI.SatHelper_validateModel(model_proto.toByteArray());
90 this(mainJNI.new_SatHelper(),
true);