Class DefaultWeightedEdge

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable

    public class DefaultWeightedEdge
    extends DefaultEdge
    A default implementation for edges in a WeightedGraph. All access to the weight of an edge must go through the graph interface, which is why this class doesn't expose any public methods.
    See Also:
    Serialized Form
    • Field Detail

      • weight

        double weight
    • Constructor Detail

      • DefaultWeightedEdge

        public DefaultWeightedEdge()
    • Method Detail

      • getWeight

        protected double getWeight()
        Retrieves the weight of this edge. This is protected, for use by subclasses only (e.g. for implementing toString).
        Returns:
        weight of this edge