Class Edge


  • public class Edge
    extends java.lang.Object
    Edges of a graph in DijkstraAlgorithm.
    Since:
    Ptolemy II 11.0
    Version:
    $Id$
    Author:
    Maryam Bagheri
    • Constructor Summary

      Constructors 
      Constructor Description
      Edge​(int id, Vertex source, Vertex destination, int weight)
      Create an edge.
    • Constructor Detail

      • Edge

        public Edge​(int id,
                    Vertex source,
                    Vertex destination,
                    int weight)
        Create an edge.
        Parameters:
        id - an int specifying an identifier
        source - a source
        destination - a destination
        weight - a weight.
    • Method Detail

      • getId

        public int getId()
        Get the id.
        Returns:
        The id.
      • getDestination

        public Vertex getDestination()
        Get the destination.
        Returns:
        The destination.
      • getSource

        public Vertex getSource()
        Get the source.
        Returns:
        The source
      • getWeight

        public int getWeight()
        Get the weight.
        Returns:
        the weight.