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

    Constructors
    Constructor
    Description
    DoubleValueRange(double from, double to)
    Deprecated, for removal: This API element is subject to removal in a future version.
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
     
    @NonNull Iterator<Double>
    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.
    boolean
    Deprecated, for removal: This API element is subject to removal in a future version.
    In a CountableValueRange, this must be consistent with CountableValueRange.getSize().
    Deprecated, for removal: This API element is subject to removal in a future version.
     

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
  • 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 minimum
      to - 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: ValueRange
      In a CountableValueRange, this must be consistent with CountableValueRange.getSize().
      Returns:
      true if the range is empty
    • contains

      public boolean contains(Double value)
      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

      public @NonNull Iterator<Double> createRandomIterator(@NonNull Random workingRandom)
      Deprecated, for removal: This API element is subject to removal in a future version.
      Description copied from interface: ValueRange
      Select 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 - the Random to use when any random number is needed, so runs are reproducible.
    • toString

      public String toString()
      Deprecated, for removal: This API element is subject to removal in a future version.
      Overrides:
      toString in class Object