Package com.jgalgo.graph
Interface Weights.Float
-
- All Superinterfaces:
Comparator<Integer>
,IntComparator
,WeightFunction
,Weights<Float>
public static interface Weights.Float extends Weights<Float>, WeightFunction
Specific weights of primitive typefloat
.- 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 Float
defaultWeight()
Deprecated.float
defaultWeightFloat()
Get the default weight of this weights container.default Float
get(int id)
Deprecated.float
getFloat(int id)
Get the weight associated with the given id.void
set(int id, float weight)
Set the weight associated with the given id.default void
set(int id, Float weight)
Deprecated.default double
weight(int id)
Get the 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
compare
-
-
-
-
Method Detail
-
getFloat
float getFloat(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 Float get(int id)
Deprecated.Description copied from interface:Weights
Get the weight associated with the given id.
-
set
void set(int id, float 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, Float weight)
Deprecated.Description copied from interface:Weights
Set the weight associated with the given id.
-
defaultWeightFloat
float defaultWeightFloat()
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, float)
.- Returns:
- the default weight of this weights container.
-
defaultWeight
@Deprecated default Float defaultWeight()
Deprecated.Description copied from interface:Weights
Get 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:
defaultWeight
in interfaceWeights<Float>
- Returns:
- the default weight of this weights container.
-
weight
default double weight(int id)
Get the weight of an element.Implement the
WeightFunction
interface by using the weights of the container.- Specified by:
weight
in interfaceWeightFunction
- Parameters:
id
- an element identifier- Returns:
- the weight of the element
-
-