Package com.jgalgo.graph
Interface Weights.Int
-
- All Superinterfaces:
Comparator<Integer>,IntComparator,WeightFunction,WeightFunction.Int,Weights<Integer>
public static interface Weights.Int extends Weights<Integer>, WeightFunction.Int
Specific weights of primitive typeint.- Author:
- Barak Ugav
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jgalgo.graph.WeightFunction
WeightFunction.Int
-
Nested classes/interfaces inherited from interface com.jgalgo.graph.Weights
Weights.Bool, Weights.Byte, Weights.Char, Weights.Double, Weights.Float, Weights.Int, Weights.Long, Weights.Short
-
-
Field Summary
-
Fields inherited from interface com.jgalgo.graph.WeightFunction
CardinalityWeightFunction
-
Fields inherited from interface com.jgalgo.graph.Weights
DefaultBipartiteWeightKey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default IntegerdefaultWeight()Deprecated.intdefaultWeightInt()Get the default weight of this weights container.default Integerget(int id)Deprecated.intgetInt(int id)Get the weight associated with the given id.voidset(int id, int weight)Set the weight associated with the given id.default voidset(int id, Integer weight)Deprecated.default intweightInt(int id)Get the integer weight of an element.-
Methods inherited from interface java.util.Comparator
equals, thenComparing, thenComparing, thenComparingDouble, thenComparingInt, thenComparingLong
-
Methods inherited from interface it.unimi.dsi.fastutil.ints.IntComparator
compare, reversed, thenComparing, thenComparing
-
Methods inherited from interface com.jgalgo.graph.WeightFunction.Int
compare, weight
-
-
-
-
Method Detail
-
getInt
int getInt(int id)
Get the weight associated with the given id.- Parameters:
id- an id of edge/vertex.- Returns:
- the weight associated with the given id.
-
get
@Deprecated default Integer get(int id)
Deprecated.Description copied from interface:WeightsGet the weight associated with the given id.
-
set
void set(int id, int weight)Set the weight associated with the given id.- Parameters:
id- an id of edge/vertexweight- new weight that will be associated with the given id
-
set
@Deprecated default void set(int id, Integer weight)
Deprecated.Description copied from interface:WeightsSet the weight associated with the given id.
-
defaultWeightInt
int defaultWeightInt()
Get the default weight of this weights container.The default weight is the weight associated with all ids that were not explicitly set using
set(int, int).- Returns:
- the default weight of this weights container.
-
defaultWeight
@Deprecated default Integer defaultWeight()
Deprecated.Description copied from interface:WeightsGet the default weight of this weights container.The default weight is the weight associated with all ids that were not explicitly set using
Weights.set(int, Object).- Specified by:
defaultWeightin interfaceWeights<Integer>- Returns:
- the default weight of this weights container.
-
weightInt
default int weightInt(int id)
Get the integer weight of an element.Implement the
WeightFunction.Intinterface by using the weights of the container.- Specified by:
weightIntin interfaceWeightFunction.Int- Parameters:
id- an element identifier- Returns:
- the integer weight of the element
-
-