//represents the edges in the graph
public class Edge{
private Vertex toNode;
private double weight;
public Edge(Vertex toNode,double weight) {
this.toNode=toNode;
this.weight=weight;
}
public Vertex getToNode() {
return toNode;
}
public void setToNode(Vertex toNode) {
this.toNode = toNode;
}
public double getWeight() {
return weight;
}
public void setWeight(double weight) {
this.weight = weight;
}
}