Class DoubleValueRange
java.lang.Object
ai.timefold.solver.core.impl.domain.valuerange.AbstractUncountableValueRange<Double>
ai.timefold.solver.core.impl.domain.valuerange.buildin.primdouble.DoubleValueRange
- All Implemented Interfaces:
ValueRange<Double>
@Deprecated(forRemoval=true,
since="1.1.0")
public class DoubleValueRange
extends AbstractUncountableValueRange<Double>
Deprecated, for removal: This API element is subject to removal in a future version.
Note: Floating point numbers (float, double) cannot represent a decimal number correctly.
If floating point numbers leak into the scoring function, they are likely to cause score corruptions.
To avoid that, use either
BigDecimal or fixed-point arithmetic.-
Constructor Summary
ConstructorsConstructorDescriptionDoubleValueRange(double from, double to) Deprecated, for removal: This API element is subject to removal in a future version. -
Method Summary
Modifier and TypeMethodDescriptionbooleanDeprecated, for removal: This API element is subject to removal in a future version.createRandomIterator(@NonNull Random workingRandom) Deprecated, for removal: This API element is subject to removal in a future version.Select in random order, but without shuffling the elements.booleanisEmpty()Deprecated, for removal: This API element is subject to removal in a future version.In aCountableValueRange, this must be consistent withCountableValueRange.getSize().toString()Deprecated, for removal: This API element is subject to removal in a future version.
-
Constructor Details
-
DoubleValueRange
public DoubleValueRange(double from, double to) Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
from- inclusive minimumto- exclusive maximum,>= from
-
-
Method Details
-
isEmpty
public boolean isEmpty()Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ValueRangeIn aCountableValueRange, this must be consistent withCountableValueRange.getSize().- Returns:
- true if the range is empty
-
contains
Deprecated, for removal: This API element is subject to removal in a future version.- Parameters:
value- sometimes null- Returns:
- true if the ValueRange contains that value
-
createRandomIterator
Deprecated, for removal: This API element is subject to removal in a future version.Description copied from interface:ValueRangeSelect in random order, but without shuffling the elements. Each element might be selected multiple times. Scales well because it does not require caching.- Parameters:
workingRandom- theRandomto use when any random number is needed, so runs are reproducible.
-
toString
Deprecated, for removal: This API element is subject to removal in a future version.
-
BigDecimalValueRange.