knapsack-problem 源代码

汇集 knapsack-problem 相关的电路原理图、PCB工程文件、单片机/FPGA源代码、数据手册与应用设计方案。

收录资源 500 份 全站深度检索
源码文件

// backtracking knapsack solution #include #include "msort.h" #include "object.h" template class Knap { friend Tp Knapsack(T…

源码文件

// dynamic programming recursive knapsack #include #include "dosmax.h" int p[6] = {0, 6, 3, 5, 4, 6}; int w[6] = {0, 2, 2, 6, 5…

源码文件

#include using namespace std; class Knap { friend int Knapsack(int p[],int w[],int c,int n ); public: void print() …

源码文件

#define MAXSIZE 26 #define CAPACITY 500 static int Xi[MAXSIZE+1]; static int CurrentXi[MAXSIZE+1]; static int CurrentWeight=…

源码文件

#include "knapsack.h" #include #include void main() { LARGE_INTEGER t1, t2, tc; QueryPerformanceFrequency(&tc); …

源码文件

#include #include #include "knapsack.h" void KnapsackByExhaustion(int i) { if(i>MAXSIZE) { if(CurrentValue>BestValu…

源码文件

#define MAXSIZE 26 #define CAPACITY 500 typedef struct{ int Weight[MAXSIZE+1]; int Value[MAXSIZE+1]; int Capacity; }KNA…

源码文件

#define MAXSIZE 26 #define CAPACITY 500 static int BestValue[MAXSIZE+1][CAPACITY+1]; static int Xi[MAXSIZE+1]; typedef str…

源码文件

#include "knapsack.h" #include #include void main() { LARGE_INTEGER t1, t2, tc; QueryPerformanceFrequency(&tc); …

源码文件

#include int w[6]={0,1,2,3,4,5}; int v[6]={0,1,2,3,4,5}; int c[6][11]={0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0…