Interface Weights.Double

    • Method Detail

      • getDouble

        double getDouble​(int id)
        Get the weight associated with the given id.
        Parameters:
        id - an id of edge/vertex.
        Returns:
        the weight associated with the given id.
      • get

        @Deprecated
        default Double get​(int id)
        Deprecated.
        Description copied from interface: Weights
        Get the weight associated with the given id.
        Specified by:
        get in interface Weights<Double>
        Parameters:
        id - an id of edge/vertex
        Returns:
        the weight associated with the given id
      • set

        void set​(int id,
                 double weight)
        Set the weight associated with the given id.
        Parameters:
        id - an id of edge/vertex
        weight - new weight that will be associated with the given id
      • set

        @Deprecated
        default void set​(int id,
                         Double weight)
        Deprecated.
        Description copied from interface: Weights
        Set the weight associated with the given id.
        Specified by:
        set in interface Weights<Double>
        Parameters:
        id - an id of edge/vertex
        weight - new weight that will be associated with the given id
      • defaultWeightDouble

        double defaultWeightDouble()
        Get the default weight of this weights container.

        The default weight is the weight associated with all ids that were not explicitly set using set(int, double).

        Returns:
        the default weight of this weights container.
      • defaultWeight

        @Deprecated
        default Double defaultWeight()
        Deprecated.
        Description copied from interface: Weights
        Get the default weight of this weights container.

        The default weight is the weight associated with all ids that were not explicitly set using Weights.set(int, Object).

        Specified by:
        defaultWeight in interface Weights<Double>
        Returns:
        the default weight of this weights container.
      • weight

        default double weight​(int id)
        Get the weight of an element.

        Implement the WeightFunction interface by using the weights of the container.

        Specified by:
        weight in interface WeightFunction
        Parameters:
        id - an element identifier
        Returns:
        the weight of the element