distinctCount

fun distinctCount(start: Int, end: Int): Int(source)

The number of distinct values within the index range from start until end. This is exact only when both endpoints are admissible cut positions, because otherwise a run of equal values straddles the boundary and is counted on one side only.

Parameters

start

the inclusive start index, within 0..numObservations

end

the exclusive end index, at least start and within 0..numObservations