Package com.jgalgo.graph
Interface IWeightsShort
-
- All Superinterfaces:
Comparator<Integer>
,IntComparator
,IWeightFunction
,IWeightFunctionInt
,IWeights<Short>
,WeightFunction<Integer>
,WeightFunctionInt<Integer>
,Weights<Integer,Short>
,WeightsShort<Integer>
public interface IWeightsShort extends IWeights<Short>, WeightsShort<Integer>, IWeightFunctionInt
Specific weights ofshort
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
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default int
compare(Integer e1, Integer e2)
Deprecated.short
get(int element)
Get the weight associated with the given element.default short
get(Integer element)
Deprecated.default Short
getAsObj(int element)
Deprecated.default Short
getAsObj(Integer element)
Deprecated.void
set(int element, short weight)
Set the weight associated with the given element.default void
set(Integer element, short weight)
Deprecated.default void
setAsObj(int element, Short weight)
Deprecated.default void
setAsObj(Integer element, Short weight)
Deprecated.default int
weightInt(int element)
Get the integer weight of an element.default int
weightInt(Integer element)
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.WeightsShort
defaultWeight, defaultWeightAsObj
-
-
-
-
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 interfaceWeightsShort<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.
-
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 interfaceWeightsShort<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.
-
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.
-
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.
-
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 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 interfaceIWeightFunctionInt
- Specified by:
weightInt
in interfaceWeightFunctionInt<Integer>
- Specified by:
weightInt
in interfaceWeightsShort<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 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>
-
-