result.java

来自「自己上学编的基于Dijkstra的最短路径&最大流量java源码」· Java 代码 · 共 44 行

JAVA
44
字号
/**
 * The class Result is used to represents edges in the shortest path
 */
public class Result {
	//start node
	private String preNode;

	//end node
    private String nachnode;

    //weight (distance or time)
    private float weight;

    public Result(String preNode, String nachnode, float weight) {
        this.preNode = preNode;
        this.nachnode = nachnode;
        this.weight = weight;
    }

    public String getPreNode() {
        return preNode;
    }

    public void setPreNode(String preNode) {
        this.preNode = preNode;
    }

    public String getNachNode() {
        return nachnode;
    }

    public void setNachNode(String nachnode) {
        this.nachnode = nachnode;
    }

    public float getWeight() {
        return weight;
    }

    public void setWeight(float weight) {
        this.weight = weight;
    }
}

⌨️ 快捷键说明

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