Interface Weights.Short

    • Method Detail

      • getShort

        short getShort​(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 Short get​(int id)
        Deprecated.
        Description copied from interface: Weights
        Get the weight associated with the given id.
        Specified by:
        get in interface Weights<Short>
        Parameters:
        id - an id of edge/vertex
        Returns:
        the weight associated with the given id
      • set

        void set​(int id,
                 short 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,
                         Short weight)
        Deprecated.
        Description copied from interface: Weights
        Set the weight associated with the given id.
        Specified by:
        set in interface Weights<Short>
        Parameters:
        id - an id of edge/vertex
        weight - new weight that will be associated with the given id
      • defaultWeightShort

        short defaultWeightShort()
        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, short).

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

        @Deprecated
        default Short 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<Short>
        Returns:
        the default weight of this weights container.
      • weightInt

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

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

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