?? p292.cpp
字號:
#include "P267e.cpp" template <class NameType, class DistType> class AOVGraph :public Graph<NameType,DistType> { private: int *count; //入度數組, 記錄各頂點的入度 public: AOVGraph ( const int sz=DefaultSize ) ; void TopologicalSort ( ); }; template <class NameType, class DistType> AOVGraph<NameType,DistType>::AOVGraph ( const int sz=DefaultSize ) { count = new int[sz]; //建立入度數組 for (int i=0;i<sz;i++) count[i]=0; for (i=0;i<NumVertices;i++) { Edge<NameType,DistType> *p=NodeTable[i].adj; while (p) { count[p->dest]++; p = p->link; } } };
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -