Package com.jgalgo
Interface Weights.Double
-
- All Superinterfaces:
Comparator<Integer>,it.unimi.dsi.fastutil.ints.IntComparator,WeightFunction,Weights<Double>
public static interface Weights.Double extends Weights<Double>, WeightFunction
Specific weights of primitive typedouble.- Author:
- Barak Ugav
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface com.jgalgo.WeightFunction
WeightFunction.Int
-
Nested classes/interfaces inherited from interface com.jgalgo.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.WeightFunction
CardinalityWeightFunction
-
Fields inherited from interface com.jgalgo.Weights
DefaultBipartiteWeightKey
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default DoubledefaultWeight()Deprecated.doubledefaultWeightDouble()Get the default weight of this weights container.default Doubleget(int id)Deprecated.doublegetDouble(int id)Get the weight associated with the given id.voidset(int id, double weight)Set the weight associated with the given id.default voidset(int id, Double weight)Deprecated.default doubleweight(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.WeightFunction
compare
-
-
-
-
Method Detail
-
getDouble
double getDouble(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 Double get(int id)
Deprecated.Description copied from interface:WeightsGet the weight associated with the given id.
-
set
void set(int id, double 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, Double weight)
Deprecated.Description copied from interface:WeightsSet the weight associated with the given id.
-
defaultWeightDouble
double defaultWeightDouble()
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, double).- Returns:
- the default weight of this weights container.
-
defaultWeight
@Deprecated default Double 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<Double>- Returns:
- the default weight of this weights container.
-
weight
default double weight(int id)
Get the weight of an element.Implement the
WeightFunctioninterface by using the weights of the container.- Specified by:
weightin interfaceWeightFunction- Parameters:
id- an element identifier- Returns:
- the weight of the element
-
-