Package com.jgalgo.graph
Interface IWeightsDouble
-
- All Superinterfaces:
Comparator<Integer>,IntComparator,IWeightFunction,IWeights<Double>,WeightFunction<Integer>,Weights<Integer,Double>,WeightsDouble<Integer>
public interface IWeightsDouble extends IWeights<Double>, WeightsDouble<Integer>, IWeightFunction
Specific weights ofdoublefor 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.doubleget(int element)Get the weight associated with the given element.default doubleget(Integer element)Deprecated.Please useget(int)instead to avoid un/boxing.default DoublegetAsObj(int element)Deprecated.Please useget(int)instead to avoid un/boxing.default DoublegetAsObj(Integer element)Deprecated.Please useget(int)instead to avoid un/boxing.voidset(int element, double weight)Set the weight associated with the given element.default voidset(Integer element, double weight)Deprecated.Please useset(int, double)instead to avoid un/boxing.default voidsetAsObj(int element, Double weight)Deprecated.Please useset(int, double)instead to avoid un/boxing.default voidsetAsObj(Integer element, Double weight)Deprecated.Please useset(int, double)instead to avoid un/boxing.default doubleweight(int element)Get the weight of an element.default doubleweight(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.IWeightFunction
compare, weightSum
-
Methods inherited from interface com.jgalgo.graph.WeightsDouble
defaultWeight, defaultWeightAsObj
-
-
-
-
Method Detail
-
get
double 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 double get(Integer element)
Deprecated.Please useget(int)instead to avoid un/boxing.Get the weight associated with the given element.- Specified by:
getin interfaceWeightsDouble<Integer>- Parameters:
element- an element (edge/vertex).- Returns:
- the weight associated with the given element.
-
getAsObj
@Deprecated default Double getAsObj(int element)
Deprecated.Please useget(int)instead to avoid un/boxing.Get the weight associated with the given id.
-
getAsObj
@Deprecated default Double getAsObj(Integer element)
Deprecated.Please useget(int)instead to avoid un/boxing.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.
-
set
void set(int element, double 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, double weight)
Deprecated.Please useset(int, double)instead to avoid un/boxing.Set the weight associated with the given element.- Specified by:
setin interfaceWeightsDouble<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, Double weight)
Deprecated.Please useset(int, double)instead to avoid un/boxing.Set the weight associated with the given id.
-
setAsObj
@Deprecated default void setAsObj(Integer element, Double weight)
Deprecated.Please useset(int, double)instead to avoid un/boxing.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.
-
weight
default double weight(int element)
Get the weight of an element.Implement the
IWeightFunctioninterface by using the weights of the container.- Specified by:
weightin interfaceIWeightFunction- Parameters:
element- an element identifier- Returns:
- the weight of the element
-
weight
@Deprecated default double weight(Integer element)
Deprecated.Get the weight of an element.Implement the
WeightFunctioninterface by using the weights of the container.Implement the
WeightFunctionIntinterface by using the weights of the container.- Specified by:
weightin interfaceIWeightFunction- Specified by:
weightin interfaceWeightFunction<Integer>- Specified by:
weightin interfaceWeightsDouble<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 interfaceWeightFunction<Integer>
-
-