agraph.h

来自「data structures, algorithms and Applicat」· C头文件 代码 · 共 24 行

H
24
字号
// file agraph.h
// adjacency matrix representation of a graph
// initial version

#ifndef AdjacencyGraph_
#define AdjacencyGraph_

#include "awgraph.h"

class AdjacencyGraph : public AdjacencyWGraph<int>
{
   public:
      AdjacencyGraph(int Vertices = 10)
   	  : AdjacencyWGraph<int>(Vertices, 0) {}
      AdjacencyGraph& Add(int i, int j)
          {AdjacencyWGraph<int>::Add(i,j,1);
           return *this;}
      AdjacencyGraph& Delete(int i, int j)
          {AdjacencyWGraph<int>::Delete(i,j);
           return *this;}
};

#endif

⌨️ 快捷键说明

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