DotNet Reference
.Net Reference
KnapsackSolver.cs
Go to the documentation of this file.
23 return (obj == null) ? new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero) : obj.swigCPtr;
42 swigCPtr = new global::System.Runtime.InteropServices.HandleRef(null, global::System.IntPtr.Zero);
47 public KnapsackSolver(string solver_name) : this(operations_research_algorithmsPINVOKE.new_KnapsackSolver__SWIG_0(solver_name), true) {
48 if (operations_research_algorithmsPINVOKE.SWIGPendingException.Pending) throw operations_research_algorithmsPINVOKE.SWIGPendingException.Retrieve();
51 public KnapsackSolver(KnapsackSolver.SolverType solver_type, string solver_name) : this(operations_research_algorithmsPINVOKE.new_KnapsackSolver__SWIG_1((int)solver_type, solver_name), true) {
52 if (operations_research_algorithmsPINVOKE.SWIGPendingException.Pending) throw operations_research_algorithmsPINVOKE.SWIGPendingException.Retrieve();
69 bool ret = operations_research_algorithmsPINVOKE.KnapsackSolver_BestSolutionContains(swigCPtr, item_id);
93 operations_research_algorithmsPINVOKE.KnapsackSolver_set_time_limit(swigCPtr, time_limit_seconds);
bool swigCMemOwn
Definition: KnapsackSolver.cs:15
static void KnapsackSolver_SetUseReduction(global::System.Runtime.InteropServices.HandleRef jarg1, bool jarg2)
static bool KnapsackSolver_UseReduction(global::System.Runtime.InteropServices.HandleRef jarg1)
static bool KnapsackSolver_BestSolutionContains(global::System.Runtime.InteropServices.HandleRef jarg1, int jarg2)
bool IsSolutionOptimal()
Definition: KnapsackSolver.cs:73
void set_time_limit(double time_limit_seconds)
Definition: KnapsackSolver.cs:92
KnapsackSolver(KnapsackSolver.SolverType solver_type, string solver_name)
Definition: KnapsackSolver.cs:51
Definition: operations_research_algorithmsPINVOKE.cs:13
void SetUseReduction(bool use_reduction)
Definition: KnapsackSolver.cs:88
static bool Pending
Definition: operations_research_algorithmsPINVOKE.cs:133
KnapsackSolver(string solver_name)
Definition: KnapsackSolver.cs:47
static void KnapsackSolver_Init(global::System.Runtime.InteropServices.HandleRef jarg1, int length2, long[] jarg2, int len3_1, int len3_2, long[] jarg3, int length4, long[] jarg4)
void Init(long[] profits, long[,] weights, long[] capacities)
Definition: KnapsackSolver.cs:55
virtual void Dispose(bool disposing)
Definition: KnapsackSolver.cs:35
bool BestSolutionContains(int item_id)
Definition: KnapsackSolver.cs:68
static long KnapsackSolver_Solve(global::System.Runtime.InteropServices.HandleRef jarg1)
bool UseReduction()
Definition: KnapsackSolver.cs:83
static void delete_KnapsackSolver(global::System.Runtime.InteropServices.HandleRef jarg1)
Definition: operations_research_algorithmsPINVOKE.cs:127
static bool KnapsackSolver_IsSolutionOptimal(global::System.Runtime.InteropServices.HandleRef jarg1)
static void KnapsackSolver_set_time_limit(global::System.Runtime.InteropServices.HandleRef jarg1, double jarg2)
static global::System.Exception Retrieve()
Definition: operations_research_algorithmsPINVOKE.cs:152
static string KnapsackSolver_GetName(global::System.Runtime.InteropServices.HandleRef jarg1)