Class WeightedEdge<V,W extends Weight<?>>

java.lang.Object
com.aoapps.hodgepodge.graph.Edge<V>
com.aoapps.hodgepodge.graph.WeightedEdge<V,W>

public class WeightedEdge<V,W extends Weight<?>> extends Edge<V>
A weighted edge (or arc) between two vertices.
  • Field Details

    • weight

      protected final W extends Weight<?> weight
  • Constructor Details

    • WeightedEdge

      public WeightedEdge(V from, V to, W weight)
  • Method Details

    • getWeight

      public final W getWeight()
      The weight of the edge.
    • toString

      public String toString()
      Overrides:
      toString in class Edge<V>