9 package com.google.ortools.constraintsolver;
13 import java.util.function.LongUnaryOperator;
16 import java.util.function.LongBinaryOperator;
19 private transient long swigCPtr;
21 protected Pack(
long cPtr,
boolean cMemoryOwn) {
22 super(mainJNI.Pack_SWIGUpcast(cPtr), cMemoryOwn);
26 protected static long getCPtr(
Pack obj) {
27 return (obj ==
null) ? 0 : obj.swigCPtr;
30 @SuppressWarnings(
"deprecation")
31 protected
void finalize() {
35 public synchronized void delete() {
39 mainJNI.delete_Pack(swigCPtr);
47 this(mainJNI.new_Pack(
Solver.getCPtr(s), s, vars, number_of_bins),
true);
54 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr,
this, weights, bounds);
61 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr,
this, weights, bounds);
68 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr,
this, weights, bounds);
75 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_0(swigCPtr,
this, weights, loads);
82 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_1(swigCPtr,
this, weights, loads);
89 mainJNI.Pack_addSumVariableWeightsLessOrEqualConstantDimension(swigCPtr,
this, usage, capacity);
96 mainJNI.Pack_addWeightedSumOfAssignedDimension(swigCPtr,
this, weights,
IntVar.getCPtr(cost_var), cost_var);
103 mainJNI.Pack_addCountUsedBinDimension(swigCPtr,
this,
IntVar.getCPtr(count_var), count_var);
110 mainJNI.Pack_addCountAssignedItemsDimension(swigCPtr,
this,
IntVar.getCPtr(count_var), count_var);
114 mainJNI.Pack_post(swigCPtr,
this);
118 mainJNI.Pack_clearAll(swigCPtr,
this);
122 mainJNI.Pack_propagateDelayed(swigCPtr,
this);
126 mainJNI.Pack_initialPropagate(swigCPtr,
this);
130 mainJNI.Pack_propagate(swigCPtr,
this);
134 mainJNI.Pack_oneDomain(swigCPtr,
this, var_index);
138 return mainJNI.Pack_toString(swigCPtr,
this);
142 return mainJNI.Pack_isUndecided(swigCPtr,
this, var_index, bin_index);
146 mainJNI.Pack_setImpossible(swigCPtr,
this, var_index, bin_index);
149 public void assign(
int var_index,
int bin_index) {
150 mainJNI.Pack_assign(swigCPtr,
this, var_index, bin_index);
154 return mainJNI.Pack_isAssignedStatusKnown(swigCPtr,
this, var_index);
158 return mainJNI.Pack_isPossible(swigCPtr,
this, var_index, bin_index);
162 long cPtr = mainJNI.Pack_assignVar(swigCPtr,
this, var_index, bin_index);
163 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
167 mainJNI.Pack_setAssigned(swigCPtr,
this, var_index);
171 mainJNI.Pack_setUnassigned(swigCPtr,
this, var_index);
175 mainJNI.Pack_removeAllPossibleFromBin(swigCPtr,
this, bin_index);
179 mainJNI.Pack_assignAllPossibleToBin(swigCPtr,
this, bin_index);
183 mainJNI.Pack_assignFirstPossibleToBin(swigCPtr,
this, bin_index);
187 mainJNI.Pack_assignAllRemainingItems(swigCPtr,
this);
191 mainJNI.Pack_unassignAllRemainingItems(swigCPtr,
this);
195 mainJNI.Pack_accept(swigCPtr,
this,
ModelVisitor.getCPtr(visitor), visitor);