Package com.jgalgo.graph
Interface IWeightsInt
-
- All Superinterfaces:
Comparator<Integer>,IntComparator,IWeightFunction,IWeightFunctionInt,IWeights<Integer>,WeightFunction<Integer>,WeightFunctionInt<Integer>,Weights<Integer,Integer>,WeightsInt<Integer>
public interface IWeightsInt extends IWeights<Integer>, WeightsInt<Integer>, IWeightFunctionInt
Specific weights ofintfor 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 intcompare(Integer e1, Integer e2)Deprecated.intget(int element)Get the weight associated with the given element.default intget(Integer element)Deprecated.default IntegergetAsObj(int element)Deprecated.default IntegergetAsObj(Integer element)Deprecated.voidset(int element, int weight)Set the weight associated with the given element.default voidset(Integer element, int weight)Deprecated.default voidsetAsObj(int element, Integer weight)Deprecated.default voidsetAsObj(Integer element, Integer weight)Deprecated.default intweightInt(int element)Get the integer weight of an element.default intweightInt(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.WeightsInt
defaultWeight, defaultWeightAsObj
-
-
-
-
Method Detail
-
get
int 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 int get(Integer element)
Deprecated.Description copied from interface:WeightsIntGet the weight associated with the given element.- Specified by:
getin interfaceWeightsInt<Integer>- Parameters:
element- an element (edge/vertex).- Returns:
- the weight associated with the given element.
-
getAsObj
@Deprecated default Integer getAsObj(int element)
Deprecated.Description copied from interface:IWeightsGet the weight associated with the given id.
-
set
void set(int element, int 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, int weight)
Deprecated.Description copied from interface:WeightsIntSet the weight associated with the given element.- Specified by:
setin interfaceWeightsInt<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, Integer weight)
Deprecated.Description copied from interface:IWeightsSet the weight associated with the given id.
-
getAsObj
@Deprecated default Integer getAsObj(Integer element)
Deprecated.Description copied from interface:WeightsGet 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, Integer weight)
Deprecated.Description copied from interface:WeightsSet 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
IWeightFunctionIntinterface by using the weights of the container.- Specified by:
weightIntin 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
WeightFunctionIntinterface by using the weights of the container.Implement the
WeightFunctionIntinterface by using the weights of the container.- Specified by:
weightIntin interfaceIWeightFunctionInt- Specified by:
weightIntin interfaceWeightFunctionInt<Integer>- Specified by:
weightIntin interfaceWeightsInt<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:WeightFunctionCompare two elements by their weights.- Specified by:
comparein interfaceComparator<Integer>- Specified by:
comparein interfaceIntComparator- Specified by:
comparein interfaceIWeightFunction- Specified by:
comparein interfaceIWeightFunctionInt- Specified by:
comparein interfaceWeightFunction<Integer>- Specified by:
comparein interfaceWeightFunctionInt<Integer>
-
-