Package com.jgalgo.graph
Interface IWeightsByte
- All Superinterfaces:
Comparator<Integer>
,IntComparator
,IWeightFunction
,IWeightFunctionInt
,IWeights<Byte>
,WeightFunction<Integer>
,WeightFunctionInt<Integer>
,Weights<Integer,
,Byte> WeightsByte<Integer>
Specific weights of
byte
for int graphs.- Author:
- Barak Ugav
-
Field Summary
Fields inherited from interface com.jgalgo.graph.IWeightFunction
CardinalityWeightFunction
Fields inherited from interface com.jgalgo.graph.WeightFunction
CardinalityWeightFunction
-
Method Summary
Modifier and TypeMethodDescriptiondefault int
Deprecated.byte
get
(int element) Get the weight associated with the given element.default byte
Deprecated.default Byte
getAsObj
(int element) Deprecated.Please useget(int)
instead to avoid un/boxing.default Byte
Deprecated.Please useget(int)
instead to avoid un/boxing.void
set
(int element, byte weight) Set the weight associated with the given element.default void
Deprecated.Please useset(int, byte)
instead to avoid un/boxing.default void
Deprecated.Please useset(int, byte)
instead to avoid un/boxing.default void
Deprecated.Please useset(int, byte)
instead to avoid un/boxing.default int
weightInt
(int element) Get the integer weight of an element.default int
Deprecated.Methods inherited from interface java.util.Comparator
equals, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntComparator
reversed, thenComparing, thenComparing
Methods inherited from interface com.jgalgo.graph.IWeightFunctionInt
compare, weight, weight, weightSum
Methods inherited from interface com.jgalgo.graph.WeightsByte
defaultWeight, defaultWeightAsObj
-
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.Please useget(int)
instead to avoid un/boxing.Get the weight associated with the given element.- Specified by:
get
in interfaceWeightsByte<Integer>
- Parameters:
element
- an element (edge/vertex).- Returns:
- the weight associated with the given element.
-
getAsObj
Deprecated.Please useget(int)
instead to avoid un/boxing.Get the weight associated with the given id. -
getAsObj
Deprecated.Please useget(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.
-
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.Please useset(int, byte)
instead to avoid un/boxing.Set the weight associated with the given element.- Specified by:
set
in interfaceWeightsByte<Integer>
- Parameters:
element
- an element (edge/vertex).weight
- new weight that will be associated with the given element
-
setAsObj
Deprecated.Please useset(int, byte)
instead to avoid un/boxing.Set the weight associated with the given id. -
setAsObj
Deprecated.Please useset(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.
-
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 interfaceIWeightFunctionInt
- Parameters:
element
- an element identifier- Returns:
- the integer weight of the element
-
weightInt
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 interfaceIWeightFunctionInt
- Specified by:
weightInt
in interfaceWeightFunctionInt<Integer>
- Specified by:
weightInt
in interfaceWeightsByte<Integer>
- Parameters:
element
- an element identifier- Returns:
- the weight of the element
-
compare
Deprecated.Description copied from interface:WeightFunction
Compare two elements by their weights.- Specified by:
compare
in interfaceComparator<Integer>
- Specified by:
compare
in interfaceIntComparator
- Specified by:
compare
in interfaceIWeightFunction
- Specified by:
compare
in interfaceIWeightFunctionInt
- Specified by:
compare
in interfaceWeightFunction<Integer>
- Specified by:
compare
in interfaceWeightFunctionInt<Integer>
-
get(int)
instead to avoid un/boxing.