14using System.Runtime.InteropServices;
15using System.Collections;
16using System.Collections.Generic;
18public partial class Pack : Constraint {
22 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
this, cPtr);
25 internal static global::System.Runtime.InteropServices.HandleRef getCPtr(
Pack obj) {
26 return (obj ==
null) ?
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero) : obj.swigCPtr;
29 internal static global::System.Runtime.InteropServices.HandleRef swigRelease(Pack obj) {
32 throw new global::System.ApplicationException(
"Cannot release ownership as memory is not owned");
33 global::System.Runtime.InteropServices.HandleRef ptr = obj.swigCPtr;
34 obj.swigCMemOwn =
false;
38 return new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
42 protected override void Dispose(
bool disposing) {
44 if (swigCPtr.Handle != global::System.IntPtr.Zero) {
49 swigCPtr =
new global::System.Runtime.InteropServices.HandleRef(
null, global::System.IntPtr.Zero);
51 base.Dispose(disposing);
56 private List<LongToLong> LongToLongCallbacks;
57 private List<LongLongToLong> LongLongToLongCallbacks;
61 if (LongToLongCallbacks ==
null)
62 LongToLongCallbacks =
new List<LongToLong>();
63 LongToLongCallbacks.Add(c);
67 if (LongLongToLongCallbacks ==
null)
68 LongLongToLongCallbacks =
new List<LongLongToLong>();
69 LongLongToLongCallbacks.Add(c);
73 public Pack(Solver s, IntVarVector vars,
int number_of_bins) : this(operations_research_constraint_solverPINVOKE.new_Pack(Solver.getCPtr(s), IntVarVector.getCPtr(vars), number_of_bins), true) {
74 if (operations_research_constraint_solverPINVOKE.SWIGPendingException.Pending)
throw operations_research_constraint_solverPINVOKE.SWIGPendingException.Retrieve();
116 public override void Post() {
145 public bool IsUndecided(
int var_index,
int bin_index) {
154 public void Assign(
int var_index,
int bin_index) {
163 public bool IsPossible(
int var_index,
int bin_index) {
170 IntVar ret = (cPtr == global::System.IntPtr.Zero) ?
null : new
IntVar(cPtr, false);