/// <summary> /// Static all-in-one method to fit the splines and evaluate at X coordinates. /// </summary> /// <param name="x">Input. X coordinates to fit.</param> /// <param name="y">Input. Y coordinates to fit.</param> /// <param name="xs">Input. X coordinates to evaluate the fitted curve at.</param> /// <returns>The computed y values for each xs.</returns> public static float[] Compute(float[] x, float[] y, float[] xs) { CubicSpline spline = new CubicSpline(); return(spline.FitAndEval(x, y, xs)); }