graph.h

来自「clustering for ns-2 simulation」· C头文件 代码 · 共 28 行

H
28
字号
#ifndef _GRAPH_H_
#define _GRAPH_H_

#include <map>
#include <set>
#include <string>

using namespace std;

// Node list
typedef set<int> NodeList;

// Graph definition.
typedef map<int, NodeList> Graph;

// Connect two nodes.
void connect(int nodeA, int nodeB, Graph & graph);

// Erase a node from a graph and all links related to it.
void cancelNode(int node, Graph & graph);

// Calcola il numero di links e il degree di un grafo.
void countLinks(Graph & graph, int & links);

void changeToGraph(string & fileName);

#endif

⌨️ 快捷键说明

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