DirectedEdge.java

package cn.denghanxi.s44;

/**
 * Created by dhx on 2018/7/4.
 */
public class DirectedEdge {

    private final int v, w;
    private final double weight;

    public DirectedEdge(int v, int w, double weight) {
        this.v = v;
        this.w = w;
        this.weight = weight;
    }

    public int from() {
        return v;
    }

    public int to() {
        return w;
    }

    public double weight() {
        return weight;
    }
}