Data hosted with ♥ by Pastebin.com - Download Raw - See Original
  1. //represents the edges in the graph
  2. public class Edge{
  3.    
  4.     private Vertex toNode;
  5.     private double weight;
  6.    
  7.     public Edge(Vertex toNode,double weight) {
  8.         this.toNode=toNode;
  9.         this.weight=weight;
  10.     }
  11.     public Vertex getToNode() {
  12.         return toNode;
  13.     }
  14.     public void setToNode(Vertex toNode) {
  15.         this.toNode = toNode;
  16.     }
  17.     public double getWeight() {
  18.         return weight;
  19.     }
  20.     public void setWeight(double weight) {
  21.         this.weight = weight;
  22.     }
  23.    
  24. }