C语言的线性规划

#include
#include
#include
using namespace std;
#define   BORDER   -0.00001
#define   M   100
int   main()
{
    int   k;   //初始变量的个数
    int   m;                   //约束条件的个数;
    cout<<"输入初始变量的个数   "<>k;
    cout   <<"输入约束条件的个数"<>m;
    cout<<"输入约束条件的种类"<="<>Index[i];
    for(i=k+NGET+NLET;i>NTYPE;
	
    if(NTYPE) //the   initionalization   of   the   c[i];
    {
		for(i=0;i=   =);
    {
		if(code[i]==0)
		{
			a[i][INDEXL]=1.0;
			INDEXL++;
		}
		if(code[i]==1)
		{
			a[i][INDEXE]=1.0;
			INDEXE++;
			a[i][INDEXG]=-1.0;
			INDEXG++;
			ARTV[I]=i;
			I++;
		}
		if(code[i]==2)
		{
			a[i][INDEXE]=1.0;
			INDEXE++;
			ARTV[I]=i;
			I++;
		}
    }
	
	
    if(     (INDEXG!=k+NLET)   ||   (INDEXL!=k+NGET+NLET)   ||   (INDEXE!=n)   )//excption
    {
		return   -1;
    }
    cout<<"输入约束表达式左边的系数"<>a[i][j];
		
		float   *b=new   float[m];
		cout<<"输入约束表达式右边的值"   <>b[i];
		for(i=0;ia[m][i])
					{
						temp1=a[m][i];
						K=i;
						
					}
				}
				
				temp2=M;
				for(i=0;i0&&(a[i][n]/a[i][K])

你可能感兴趣的:(图论*)