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

📄 dijkstrainterface.java

📁 这是一个将Dijkstra算法的时间复杂度从O(n*n) 优化为O(nlogn)的方法
💻 JAVA
字号:
// DijkstraInterface.java// CNA, S2, 2008// v 0.1, 02 July 2008 - Nick Falknerpublic interface DijkstraInterface {    // This allows the programmer to change the source node for calculation    // without forcing them to expose their data structure.    public NetworkNode getSourceNode();    // initialiseNetwork opens up and parses the config file, then puts it    // into the Network storage representation format.    // Regardless of how you implement this, the network must be ready to     // go when we push the 'computeShortestPaths' button.    public void initialiseNetwork(String filename);    // This is the important part - we have to nominate a source node    // from which all paths are calculated, or the algorithm won't work.    public void computeShortestPaths(NetworkNode sourceNode);    // This should display all of the final network paths and weights    // in the format given in the assignment.    public void displayFinalNetwork();}

⌨️ 快捷键说明

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