/// <summary> /// creates a new Interpolator instance where the x and y arrays are swapped to allow lookups the other way around /// </summary> /// <param name="source"></param> /// <returns></returns> public static Interpolator InverseInterpolator(Interpolator source) { if (null == source) { throw new ArgumentNullException(nameof(source)); } return(new Interpolator(source.yArray, source.xArray)); }
public Interpolator2D(Interpolator2D other) { xArray = other.xArray; size = other.size; yArray = new Interpolator[size]; for (int i = 0; i < size; i++) { yArray[i] = new Interpolator(other.yArray[i]); } }
public Interpolator(Interpolator other) { if (null == other) { throw new ArgumentNullException(nameof(other)); } xArray = other.xArray; yArray = other.yArray; y2Array = other.y2Array; size = other.size; }
public Interpolator2D(Interpolator2D other) { if (null == other) { throw new ArgumentNullException(nameof(other)); } xArray = other.xArray; size = other.size; yArray = new Interpolator[size]; for (int i = 0; i < size; i++) { yArray[i] = new Interpolator(other.yArray[i]); } }