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;
30 @SuppressWarnings(
"deprecation")
35 public synchronized void delete() {
39 mainJNI.delete_Pack(swigCPtr);
47 this(mainJNI.new_Pack(
Solver.
getCPtr(s), s, vars, number_of_bins),
true);
51 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_0(swigCPtr,
this, weights, bounds);
55 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_1(swigCPtr,
this, weights, bounds);
59 mainJNI.Pack_addWeightedSumLessOrEqualConstantDimension__SWIG_2(swigCPtr,
this, weights, bounds);
63 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_0(swigCPtr,
this, weights, loads);
67 mainJNI.Pack_addWeightedSumEqualVarDimension__SWIG_1(swigCPtr,
this, weights, loads);
71 mainJNI.Pack_addSumVariableWeightsLessOrEqualConstantDimension(swigCPtr,
this, usage, capacity);
75 mainJNI.Pack_addWeightedSumOfAssignedDimension(swigCPtr,
this, weights,
IntVar.
getCPtr(cost_var), cost_var);
79 mainJNI.Pack_addCountUsedBinDimension(swigCPtr,
this,
IntVar.
getCPtr(count_var), count_var);
83 mainJNI.Pack_addCountAssignedItemsDimension(swigCPtr,
this,
IntVar.
getCPtr(count_var), count_var);
87 mainJNI.Pack_post(swigCPtr,
this);
91 mainJNI.Pack_clearAll(swigCPtr,
this);
95 mainJNI.Pack_propagateDelayed(swigCPtr,
this);
99 mainJNI.Pack_initialPropagate(swigCPtr,
this);
103 mainJNI.Pack_propagate(swigCPtr,
this);
107 mainJNI.Pack_oneDomain(swigCPtr,
this, var_index);
111 return mainJNI.Pack_toString(swigCPtr,
this);
115 return mainJNI.Pack_isUndecided(swigCPtr,
this, var_index, bin_index);
119 mainJNI.Pack_setImpossible(swigCPtr,
this, var_index, bin_index);
122 public void assign(
int var_index,
int bin_index) {
123 mainJNI.Pack_assign(swigCPtr,
this, var_index, bin_index);
127 return mainJNI.Pack_isAssignedStatusKnown(swigCPtr,
this, var_index);
131 return mainJNI.Pack_isPossible(swigCPtr,
this, var_index, bin_index);
135 long cPtr = mainJNI.Pack_assignVar(swigCPtr,
this, var_index, bin_index);
136 return (cPtr == 0) ? null :
new IntVar(cPtr,
false);
140 mainJNI.Pack_setAssigned(swigCPtr,
this, var_index);
144 mainJNI.Pack_setUnassigned(swigCPtr,
this, var_index);
148 mainJNI.Pack_removeAllPossibleFromBin(swigCPtr,
this, bin_index);
152 mainJNI.Pack_assignAllPossibleToBin(swigCPtr,
this, bin_index);
156 mainJNI.Pack_assignFirstPossibleToBin(swigCPtr,
this, bin_index);
160 mainJNI.Pack_assignAllRemainingItems(swigCPtr,
this);
164 mainJNI.Pack_unassignAllRemainingItems(swigCPtr,
this);