dijkstrainterface.java
来自「用JAVA实现的一种DIJ算法过程」· Java 代码 · 共 30 行
JAVA
30 行
// 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 + =
减小字号Ctrl + -
显示快捷键?