graphprv.h

来自「稀疏矩阵、链表、图、队列、二叉树、多叉树、排序、遗传算法等的实现」· C头文件 代码 · 共 30 行

H
30
字号
/* graphprivate.h */

/* This header file defines internal (i.e. private) structures. This
   is only the Graph_Spec structure - it defines the functions to call
   from the functions defined in graph.h which are representation
   specific. Each representation should have a Graph_Spec structure
   defined extern in it's header file, and fully defined in the
   accompanying c file.
*/

#ifndef GRAPHPRIVATE_H
#define GRAPHPRIVATE_H

#include "graphs.h"

struct Graph_Spec
{
	int  (*MakeGraph)       (struct Graph *);
	void (*FreeGraph)       (struct Graph *);
    int  (*AddVertex)       (struct Graph *, int Index);
	void (*RemoveVertex)    (struct Graph *, int Index);
	int  (*ConnectVertex)   (struct Graph *, int Source, int Destination, int Cost);
	int  (*DisconnectVertex)(struct Graph *, int Source, int Destination);
	int  (*EdgeScanStart)   (struct Graph *, int Index, struct EdgeScan *);
	int  (*EdgeScanEnd)     (struct EdgeScan *);
	int  (*EdgeScanNext)    (struct EdgeScan *);
};

#endif

⌨️ 快捷键说明

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