Class Edge

java.lang.Object
com.thomas.graphs.Edge

public class Edge extends Object
A simple implementation of an edge clasas
See Also:
  • Field Details

    • dest

      public Vertex dest
      Where this edge goes to
    • weight

      public int weight
      The "cost" of going to the destination
  • Constructor Details

    • Edge

      public Edge(Vertex dest, int cost)
      Creates an edge to a vertex with a set distance
      Parameters:
      dest - Where this edge is going
      cost - how much it is going to cost to get there
  • Method Details