⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 routesmap.java

📁 A java code shows how to use dijkstra algorithm it includes a test program and document
💻 JAVA
字号:
package com.waldura.tw;

import java.util.List;

/**
 * This interface defines the object storing the graph of all routes in the
 * system.
 * 
 * @author Renaud Waldura <renaud+tw@waldura.com>
 * @version $Id: RoutesMap.java 2367 2007-08-20 21:47:25Z renaud $
 */

public interface RoutesMap
{
	/**
	 * Enter a new segment in the graph.
	 */
	public void addDirectRoute(City start, City end, int distance);
	
	/**
	 * Get the value of a segment.
	 */
	public int getDistance(City start, City end);
	
	/**
	 * Get the list of cities that can be reached from the given city.
	 */
	public List<City> getDestinations(City city); 
	
	/**
	 * Get the list of cities that lead to the given city.
	 */
	public List<City> getPredecessors(City city);
	
	/**
	 * @return the transposed graph of this graph, as a new RoutesMap instance.
	 */
	public RoutesMap getInverse();
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -