代码拉取完成,页面将自动刷新
package second_term.fifteenth_chapter;
import java.util.Iterator;
/**
* GraphADT defines the interface to a graph data structure.
*
* @author Lewis and Chase
* @version 4.0
*/
public interface GraphADT<T>
{
/**
* Adds a vertex to this graph, associating object with vertex.
*
* @param vertex the vertex to be added to this graph
*/
public void addVertex(T vertex);
/**
* Removes a single vertex with the given value from this graph.
*
* @param vertex the vertex to be removed from this graph
*/
public void removeVertex(T vertex);
/**
* Inserts an edge between two vertices of this graph.
*
* @param vertex1 the first vertex
* @param vertex2 the second vertex
*/
public void addEdge(T vertex1, T vertex2);
/**
* Removes an edge between two vertices of this graph.
*
* @param vertex1 the first vertex
* @param vertex2 the second vertex
*/
public void removeEdge(T vertex1, T vertex2);
/**
* Returns a breadth first iterator starting with the given vertex.
*
* @param startVertex the starting vertex
* @return a breadth first iterator beginning at the given vertex
*/
public Iterator iteratorBFS(T startVertex);
/**
* Returns a depth first iterator starting with the given vertex.
*
* @param startVertex the starting vertex
* @return a depth first iterator starting at the given vertex
*/
public Iterator iteratorDFS(T startVertex);
/**
* Returns an iterator that contains the shortest path between
* the two vertices.
*
* @param startVertex the starting vertex
* @param targetVertex the ending vertex
* @return an iterator that contains the shortest path
* between the two vertices
*/
public Iterator iteratorShortestPath(T startVertex, T targetVertex);
/**
* Returns true if this graph is empty, false otherwise.
*
* @return true if this graph is empty
*/
public boolean isEmpty();
/**
* Returns true if this graph is connected, false otherwise.
*
* @return true if this graph is connected
*/
public boolean isConnected();
/**
* Returns the number of vertices in this graph.
*
* @return the integer number of vertices in this graph
*/
public int size();
/**
* Returns a string representation of the adjacency matrix.
*
* @return a string representation of the adjacency matrix
*/
public String toString();
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。