problem.h

来自「linux下的一个分组遗传算法」· C头文件 代码 · 共 52 行

H
52
字号
//// problem.h - Reads in Graph Coloring Problems//// author: J.K.van der Hauw// edited by: J.I.v.Hemert// last update: 12-11-1997//// This file containts the class Problem. It has graph intances as input,// generated by a external program called generate. The internal representation// is an adjecencylist.//#ifndef PROBLEM_H#define PROBLEM_H#include <sys/types.h>#include <unistd.h>#include <iostream.h>#include <fstream.h>#include <stdlib.h>#include <math.h>#include <string.h>#include "genotype.h"#include "inifile.h"class Link {public:  int nodenr;  long weight;  Link *nextptr;};class ProblemC {public:  int nrofnodes;  char ProblemFilename[MAXSTRINGLENGTH];  Link* gradjl[MAXOBJECTS];  int nrofneighbors[MAXOBJECTS];  long weight[MAXOBJECTS];  void CreateProblem(int, double, int, char * problemdir, char * graphtype, int k_coloring);  void RemoveProblem();  void DeleteAdjlist();  void PrintAdjList();  int ReadProblem(); private:  char PROBLEMDIR[MAXSTRINGLENGTH];};extern ProblemC problem;#endif

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?