Interface IWeightsShort

    • Method Detail

      • get

        short get​(int element)
        Get the weight associated with the given element.
        Parameters:
        element - an element (edge/vertex.)
        Returns:
        the weight associated with the given element.
      • get

        @Deprecated
        default short get​(Integer element)
        Deprecated.
        Description copied from interface: WeightsShort
        Get the weight associated with the given element.
        Specified by:
        get in interface WeightsShort<Integer>
        Parameters:
        element - an element (edge/vertex).
        Returns:
        the weight associated with the given element.
      • getAsObj

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

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

        @Deprecated
        default void set​(Integer element,
                         short weight)
        Deprecated.
        Description copied from interface: WeightsShort
        Set the weight associated with the given element.
        Specified by:
        set in interface WeightsShort<Integer>
        Parameters:
        element - an element (edge/vertex).
        weight - new weight that will be associated with the given element
      • setAsObj

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

        @Deprecated
        default Short getAsObj​(Integer element)
        Deprecated.
        Description copied from interface: Weights
        Get the weight associated with the given element.

        This method return the weight as an object, and should not be used when its known what type the weights are.

        Specified by:
        getAsObj in interface IWeights<Short>
        Specified by:
        getAsObj in interface Weights<Integer,​Short>
        Specified by:
        getAsObj in interface WeightsShort<Integer>
        Parameters:
        element - an element (edge/vertex)
        Returns:
        the weight associated with the given element
      • setAsObj

        @Deprecated
        default void setAsObj​(Integer element,
                              Short weight)
        Deprecated.
        Description copied from interface: Weights
        Set the weight associated with the given element.

        This method accept the weight as an object, and should not be used when its known what type the weights are.

        Specified by:
        setAsObj in interface IWeights<Short>
        Specified by:
        setAsObj in interface Weights<Integer,​Short>
        Specified by:
        setAsObj in interface WeightsShort<Integer>
        Parameters:
        element - an element (edge/vertex)
        weight - new weight that will be associated with the given element
      • weightInt

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

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

        Specified by:
        weightInt in interface IWeightFunctionInt
        Parameters:
        element - an element identifier
        Returns:
        the integer weight of the element