Class MathUtils
java.lang.Object
ai.timefold.solver.core.impl.util.MathUtils
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic doublegetLogInBase(double base, double value) static longgetPossibleArrangementsScaledApproximateLog(long scale, long base, int listSize, int partitions) static longgetScaledApproximateLog(long scale, long base, long value) Returns a scaled approximation of a logstatic longgetSpeed(long count, long timeMillisSpent)
-
Field Details
-
LOG_PRECISION
public static final long LOG_PRECISION- See Also:
-
-
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 logvalue- 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)
-