?? p292.cpp
字號(hào):
#include "P267e.cpp"
template <class NameType, class DistType>
class AOVGraph :public Graph<NameType,DistType>
{
private:
int *count; //入度數(shù)組, 記錄各頂點(diǎn)的入度
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]; //建立入度數(shù)組
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;
}
}
};
?? 快捷鍵說(shuō)明
復(fù)制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號(hào)
Ctrl + =
減小字號(hào)
Ctrl + -