⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 agraph.cpp

📁 data structures, algorithms and Application书的源代码
💻 CPP
字号:
// test adjacency matrix undirected graphs

#include <iostream.h>
#include "agraph.h"

void main(void)
{
   AdjacencyGraph G(4);
   cout << "Edges = " << G.Edges() << endl;
   G.Add(2,4).Add(1,3).Add(2,1).Add(1,4).Add(3,2);
   cout << "The graph is" << endl;
   G.Output();
   G.Delete(3,1);
   cout << "The graph after deleting (3,1) is" << endl;
   G.Output();
   cout << "Exist(3,1) = " << G.Exist(3,1) << endl;
   cout << "G.Degree(2) = " << G.Degree(2) << endl;
   cout << "G.Edges() = " << G.Edges() << endl;
}

⌨️ 快捷键说明

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