2 Star 0 Fork 0

CS-IMIS-23/zc20172324

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
GraphADT.java 1.01 KB
一键复制 编辑 原始数据 按行查看 历史
zc20172324 提交于 7年前 . 15章书上代码
package chap15;
import java.util.Iterator;
/**
* @author LbZhang
* @version 创建时间:2015年12月2日 下午4:56:30
* @description 基本图的接口设计
*/
public interface GraphADT<T> {
public void addVertex(T vertex);
public void removeVertex(T vertex);
public void addEdge(T v1,T v2);
public void removeEdge(T v1,T v2);
/**
* 广度遍历
* @param startIndex
* @return
*/
public Iterator iteratorBFS(T startIndex);
/**
* 深度遍历
* @param startIndex
* @return
*/
public Iterator iteratorDFS(T startIndex);
/**
* 两个顶点之间最短路径的获取
* @param startVertex
* @param targetVertex
* @return
*/
public Iterator iteratorShortestPath(T startVertex,T targetVertex);
/**
* 判定是否为空
* @return
*/
public boolean isEmpty();
/**
* 测试连通性
* @return
*/
public boolean isConnected();
/**
* 返回顶点的规模
* @return
*/
public int size();
/**
* 输出图结构
* @return
*/
public String toString();
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Java
1
https://gitee.com/CS-IMIS-23/zc20172324.git
git@gitee.com:CS-IMIS-23/zc20172324.git
CS-IMIS-23
zc20172324
zc20172324
master

搜索帮助