图功能函数 Graph.h
来源:互联网 发布:如何在淘宝拍照购物 编辑:程序博客网 时间:2024/05/29 17:16
///////////////////////////
// //
// 图功能函数 Graph.h //
// //
//////////////////////////
#include"Graph.h"
template<class NameType,class DisType>
void Graph_Creat(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.Creat();
}
template<class NameType,class DisType>
void Graph_DFS(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.DFS();
}
template<class NameType,class DisType>
void Graph_BFS(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.BFS();
}
template<class NameType,class DisType>
void Graph_PRINT(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.PrintNode();
}
void GRAPH()
{
Graph<char,int> GraphOPP;
do
{
cout<<"图的操作: "<<endl
<<" 1) 建立图"<<endl
<<" 2) 图的深度优先搜索"<<endl
<<" 3) 图的广度优先搜索"<<endl
<<" 4) 打印图中各结点"<<endl
<<" X) 退出排序操作"<<endl;
int item;
cin>>item;
switch(item)
{
case 1: Graph_Creat(GraphOPP); break;
case 2: Graph_DFS(GraphOPP); break;
case 3: Graph_BFS(GraphOPP); break;
case 4: Graph_PRINT(GraphOPP); break;
default: return ;
}
}while(true);
}
// //
// 图功能函数 Graph.h //
// //
//////////////////////////
#include"Graph.h"
template<class NameType,class DisType>
void Graph_Creat(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.Creat();
}
template<class NameType,class DisType>
void Graph_DFS(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.DFS();
}
template<class NameType,class DisType>
void Graph_BFS(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.BFS();
}
template<class NameType,class DisType>
void Graph_PRINT(Graph<NameType,DisType> &GraphOPP)
{
GraphOPP.PrintNode();
}
void GRAPH()
{
Graph<char,int> GraphOPP;
do
{
cout<<"图的操作: "<<endl
<<" 1) 建立图"<<endl
<<" 2) 图的深度优先搜索"<<endl
<<" 3) 图的广度优先搜索"<<endl
<<" 4) 打印图中各结点"<<endl
<<" X) 退出排序操作"<<endl;
int item;
cin>>item;
switch(item)
{
case 1: Graph_Creat(GraphOPP); break;
case 2: Graph_DFS(GraphOPP); break;
case 3: Graph_BFS(GraphOPP); break;
case 4: Graph_PRINT(GraphOPP); break;
default: return ;
}
}while(true);
}
- 图功能函数 Graph.h
- 求助:为什么图功能函数 Graph.h在VC6.0中不能用?
- 图数据结构 graph.h
- graph.h
- ctype.h中的函数与功能
- Graph.Inc 图形函数
- 【Tensorflow】tf.Graph()函数
- 图Graph
- 图graph
- 图Graph
- 2014 UESTC Training for Graph Theory H
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 用CodeViz绘制函数调用关系图(call graph)
- 排序算法数据结构 Compositor.h
- 二叉树数据结构 BinTree.h
- 郁闷的一天
- 基本功能函数 BaseFun.h
- 链表 List.h
- 图功能函数 Graph.h
- 排序算法功能函数 Compositor.cpp
- 二叉树功能函数 BinTree.cpp
- 一个字,强!这种图片都能拍到..
- 偶们的书计算机图形学实验教程出版纪念
- Tomcat 和 MySQL的配置全集
- Sun Java 2 Standard Edition SDK 1.5的安装
- 迈向高手殿堂——红警2坦克战全攻略
- Apache Jakarta Tomcat 5.5.1的安装