Maximum and Minimum

Maximum is the largest value in a data set while minimum is the smallest value in the data set. They are equivalent to the 100% quantile and the smallest quantile (like 1e-10% quantile), \(Q(1)\) and \(Q(1e-10)\) respectively.


In NM Dev, the classes Max and Min are used to compute the maximum and minimum respectively.

					// create an array of doubles for our dataset
val values = doubleArrayOf(0.0, 1.0, 2.0, 3.0, 3.0, 3.0, 6.0, 7.0, 8.0, 9.0)

// create Max and Min objects
val maxVal = Max(values)
val minVal = Min(values)

println("Maximum: " + maxVal.value())
println("Minimum: " + minVal.value())

					Maximum: 9.0
Minimum: 0.0