资源简介
能够完美运行的分支定界法源程序,很好的学习实例
代码片段和文件信息
#include
#include
#include
#include
#include
#define len sizeof(struct node)
using namespace std;
typedef struct node
{
float bound;
int staus[50];
struct node *next;
}node;
int item[50]wlnstate[50];
float value[50]weight[50]max_valueratio[50];
void dele(node *fathernode *current)
{
if(current->next==NULL)
{
father->next=NULL;
return;
}
father->next=current->next;
}
void init(node *fathernode *son)
{
int i;
father->next=son;
for(i=0;i son->staus[i]=0;
son->next=NULL;
}
void branch()
{
int itj;
float diffsum=0sum_value=0;
node *head*sonbrother*father*son*prenode*p*q;
head = prenode = (node *)malloc(len);
father = (node *)malloc(le
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
文件 4723 2012-08-29 15:28 Branch.cpp
文件 3918 2012-08-29 11:03 Branch.vcxproj
文件 944 2012-08-29 11:03 Branch.vcxproj.filters
文件 143 2012-08-29 10:23 Branch.vcxproj.user
----------- --------- ---------- ----- ----
9728 4
评论
共有 条评论