graph.h

来自「经典的着色问题」· C头文件 代码 · 共 38 行

H
38
字号
// Graph.h: interface for the Graph class.
//
//////////////////////////////////////////////////////////////////////
#include<fstream.h>
#if !defined(AFX_GRAPH_H__98BF1AC2_D7CC_427B_8B1B_243E0DD0FF5A__INCLUDED_)
#define AFX_GRAPH_H__98BF1AC2_D7CC_427B_8B1B_243E0DD0FF5A__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
typedef int* edge;
struct node
{
	int visit;
	int color;
};
class Graph
{
public:
	int *vet;
	int vetnum;
	int edgnum;
	struct node* dot;
public:
	int travel(int v);
	void makegraph(ifstream &in,int m);
	edge first(int v);
	int v2(edge w);
	int v1(edge w);
	edge next(edge w);
	bool isedge(edge w);
	Graph();
	virtual ~Graph();

};

#endif // !defined(AFX_GRAPH_H__98BF1AC2_D7CC_427B_8B1B_243E0DD0FF5A__INCLUDED_)

⌨️ 快捷键说明

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