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);
27 return (obj ==
null) ? 0 : obj.swigCPtr;
34 public synchronized void delete() {
38 mainJNI.delete_Pack(swigCPtr);
46 this(mainJNI.new_Pack(
Solver.
getCPtr(s), s, vars, number_of_bins),
true);
50 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr,
this, weights, bounds);
54 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr,
this, weights, bounds);
58 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr,
this, weights, bounds);
62 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_0(swigCPtr,
this, weights, loads);
66 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_1(swigCPtr,
this, weights, loads);
70 mainJNI.Pack_addSumVariableWeightsLessOrEqualConstantDimension(swigCPtr,
this, usage, capacity);
74 mainJNI.Pack_addWeightedSumOfAssignedDimension(swigCPtr,
this, weights,
IntVar.
getCPtr(cost_var), cost_var);
78 mainJNI.Pack_addCountUsedBinDimension(swigCPtr,
this,
IntVar.
getCPtr(count_var), count_var);
82 mainJNI.Pack_addCountAssignedItemsDimension(swigCPtr,
this,
IntVar.
getCPtr(count_var), count_var);
86 mainJNI.Pack_post(swigCPtr,
this);
90 mainJNI.Pack_clearAll(swigCPtr,
this);
94 mainJNI.Pack_propagateDelayed(swigCPtr,
this);
98 mainJNI.Pack_initialPropagate(swigCPtr,
this);
102 mainJNI.Pack_propagate(swigCPtr,
this);
106 mainJNI.Pack_oneDomain(swigCPtr,
this, var_index);
110 return mainJNI.Pack_toString(swigCPtr,
this);
114 return mainJNI.Pack_isUndecided(swigCPtr,
this, var_index, bin_index);
118 mainJNI.Pack_setImpossible(swigCPtr,
this, var_index, bin_index);
121 public void assign(
int var_index,
int bin_index) {
122 mainJNI.Pack_assign(swigCPtr,
this, var_index, bin_index);
126 return mainJNI.Pack_isAssignedStatusKnown(swigCPtr,
this, var_index);
130 return mainJNI.Pack_isPossible(swigCPtr,
this, var_index, bin_index);
134 long cPtr = mainJNI.Pack_assignVar(swigCPtr,
this, var_index, bin_index);
135 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
139 mainJNI.Pack_setAssigned(swigCPtr,
this, var_index);
143 mainJNI.Pack_setUnassigned(swigCPtr,
this, var_index);
147 mainJNI.Pack_removeAllPossibleFromBin(swigCPtr,
this, bin_index);
151 mainJNI.Pack_assignAllPossibleToBin(swigCPtr,
this, bin_index);
155 mainJNI.Pack_assignFirstPossibleToBin(swigCPtr,
this, bin_index);
159 mainJNI.Pack_assignAllRemainingItems(swigCPtr,
this);
163 mainJNI.Pack_unassignAllRemainingItems(swigCPtr,
this);