Package graphs

Class Edge<V>

  • Type Parameters:
    V - the type of vertices.

    public class Edge<V>
    extends Object
    Weighted, directed edge.
    See Also:
    Graph, AStarGraph
    • Field Detail

      • from

        public final V from
        The originating vertex.
      • to

        public final V to
        The destination vertex.
      • weight

        public final double weight
        The weight of the edge.
    • Constructor Detail

      • Edge

        public Edge​(V from,
                    V to,
                    double weight)
        Constructs an edge from and to the given vertices and with the given weight.
        Parameters:
        from - the originating vertex.
        to - the destination vertex.
        weight - the weight of the edge.