Interface Weights.Int

    • Method Detail

      • getInt

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

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

        int defaultWeightInt()
        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, int).

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

        @Deprecated
        default Integer 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<Integer>
        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