scala - interpolation out of range apache -


i interpolation outside of known range. instance, need interpolated value point index 0. here code:

import org.apache.commons.math3.analysis.interpolation.splineinterpolator val = array(0.4, 0.6, 0.8, 1.0) val b  = a.zipwithindex.map(i => (i._2.todouble + 1.0, i._1)) val interp = new splineinterpolator() val filler = interp.interpolate(b.map(_._1), b.map(_._2)) println(filler.value(0.0)) 

however, following exception (exception in thread "main" org.apache.commons.math3.exception.outofrangeexception: 0 out of [1, 4] range...). there way interpolated value?


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -