Interface IWeightsLong

    • Method Detail

      • get

        long 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 long get​(Integer element)
        Deprecated.
        Description copied from interface: WeightsLong
        Get the weight associated with the given element.
        Specified by:
        get in interface WeightsLong<Integer>
        Parameters:
        element - an element (edge/vertex).
        Returns:
        the weight associated with the given element.
      • getAsObj

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

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

        @Deprecated
        default Long 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<Long>
        Specified by:
        getAsObj in interface Weights<Integer,​Long>
        Specified by:
        getAsObj in interface WeightsLong<Integer>
        Parameters:
        element - an element (edge/vertex)
        Returns:
        the weight associated with the given element
      • setAsObj

        @Deprecated
        default void setAsObj​(Integer element,
                              Long 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<Long>
        Specified by:
        setAsObj in interface Weights<Integer,​Long>
        Specified by:
        setAsObj in interface WeightsLong<Integer>
        Parameters:
        element - an element (edge/vertex)
        weight - new weight that will be associated with the given element
      • weight

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

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

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