Class MathUtils

java.lang.Object
ai.timefold.solver.core.impl.util.MathUtils

public class MathUtils extends Object
  • Field Details

  • Method Details

    • getPossibleArrangementsScaledApproximateLog

      public static long getPossibleArrangementsScaledApproximateLog(long scale, long base, int listSize, int partitions)
    • getScaledApproximateLog

      public static long getScaledApproximateLog(long scale, long base, long value)
      Returns a scaled approximation of a log
      Parameters:
      scale - What to scale the result by. Typically, a power of 10.
      base - The base of the log
      value - The parameter to the log function
      Returns:
      A value approximately equal to scale * log_base(value), rounded to the nearest integer.
    • getLogInBase

      public static double getLogInBase(double base, double value)
    • getSpeed

      public static long getSpeed(long count, long timeMillisSpent)