May have precision problem.
origin bound [0 , 1.00]
after split [ 0 - 0.9999]
Error arises when applied with actual data set.
def split (n: Int): List [BoundsInOneDimension] = {
var result: List[BoundsInOneDimension] = Nil
val increment = (upper - lower) / n
var currentLowerBound = lower
for (i <- 1 to n) {
val include = if (i < n) false else this.includeHigherBound
val newUpperBound = currentLowerBound + increment
val newSplit = new BoundsInOneDimension(currentLowerBound, newUpperBound, include)
result = newSplit :: result
currentLowerBound = newUpperBound
}
result.reverse
}
May have precision problem.
origin bound [0 , 1.00]
after split [ 0 - 0.9999]
Error arises when applied with actual data set.