您的位置:首页 > 其它

gml文件格式解析程序之头文件

2013-01-17 13:50 351 查看
// Header file for VERTEX, EDGE, and NETWORK data structures
//
// Mark Newman  11 AUG 06

#ifndef _NETWORK_H
#define _NETWORK_H

typedef struct {
int target;        // Index in the vertex[] array of neighboring vertex.
// (Note that this is not necessarily equal to the GML
// ID of the neighbor if IDs are nonconsecutive or do //nonconsecutive 非连贯的
// not start at zero.)
double weight;     // Weight of edge.  1 if no weight is specified.
} EDGE;

typedef struct {
int id;            // GML ID number of vertex
int degree;        // Degree of vertex (out-degree for directed nets)
char *label;       // GML label of vertex.  NULL if no label specified
EDGE *edge;        // Array of EDGE structs, one for each neighbor
} VERTEX;

typedef struct {
int nvertices;     // Number of vertices in network
int directed;      // 1 = directed network, 0 = undirected
VERTEX *vertex;    // Array of VERTEX structs, one for each vertex
} NETWORK;

#endif
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: