Interface IWeightsByte

All Superinterfaces:
Comparator<Integer>, IntComparator, IWeightFunction, IWeightFunctionInt, IWeights<Byte>, WeightFunction<Integer>, WeightFunctionInt<Integer>, Weights<Integer,Byte>, WeightsByte<Integer>

public interface IWeightsByte extends IWeights<Byte>, WeightsByte<Integer>, IWeightFunctionInt
Specific weights of byte for int graphs.
Author:
Barak Ugav
  • Method Details

    • get

      byte 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 byte get(Integer element)
      Deprecated.
      Please use get(int) instead to avoid un/boxing.
      Get the weight associated with the given element.
      Specified by:
      get in interface WeightsByte<Integer>
      Parameters:
      element - an element (edge/vertex).
      Returns:
      the weight associated with the given element.
    • getAsObj

      @Deprecated default Byte getAsObj(int element)
      Deprecated.
      Please use get(int) instead to avoid un/boxing.
      Get the weight associated with the given id.
      Specified by:
      getAsObj in interface IWeights<Byte>
      Parameters:
      element - an id of edge/vertex
      Returns:
      the weight associated with the given id
    • getAsObj

      @Deprecated default Byte getAsObj(Integer element)
      Deprecated.
      Please use get(int) instead to avoid un/boxing.
      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<Byte>
      Specified by:
      getAsObj in interface Weights<Integer,Byte>
      Specified by:
      getAsObj in interface WeightsByte<Integer>
      Parameters:
      element - an element (edge/vertex)
      Returns:
      the weight associated with the given element
    • set

      void set(int element, byte 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, byte weight)
      Deprecated.
      Please use set(int, byte) instead to avoid un/boxing.
      Set the weight associated with the given element.
      Specified by:
      set in interface WeightsByte<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, Byte weight)
      Deprecated.
      Please use set(int, byte) instead to avoid un/boxing.
      Set the weight associated with the given id.
      Specified by:
      setAsObj in interface IWeights<Byte>
      Parameters:
      element - an id of edge/vertex
      weight - new weight that will be associated with the given id
    • setAsObj

      @Deprecated default void setAsObj(Integer element, Byte weight)
      Deprecated.
      Please use set(int, byte) instead to avoid un/boxing.
      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<Byte>
      Specified by:
      setAsObj in interface Weights<Integer,Byte>
      Specified by:
      setAsObj in interface WeightsByte<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
    • weightInt

      @Deprecated default int weightInt(Integer element)
      Deprecated.
      Get the integer weight of an element.

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

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

      Specified by:
      weightInt in interface IWeightFunctionInt
      Specified by:
      weightInt in interface WeightFunctionInt<Integer>
      Specified by:
      weightInt in interface WeightsByte<Integer>
      Parameters:
      element - an element identifier
      Returns:
      the weight of the element
    • compare

      @Deprecated default int compare(Integer e1, Integer e2)
      Deprecated.
      Description copied from interface: WeightFunction
      Compare two elements by their weights.
      Specified by:
      compare in interface Comparator<Integer>
      Specified by:
      compare in interface IntComparator
      Specified by:
      compare in interface IWeightFunction
      Specified by:
      compare in interface IWeightFunctionInt
      Specified by:
      compare in interface WeightFunction<Integer>
      Specified by:
      compare in interface WeightFunctionInt<Integer>