Exemple #1
0
        /// <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));
        }
Exemple #2
0
 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]);
     }
 }
Exemple #3
0
 public Interpolator(Interpolator other)
 {
     if (null == other)
     {
         throw new ArgumentNullException(nameof(other));
     }
     xArray  = other.xArray;
     yArray  = other.yArray;
     y2Array = other.y2Array;
     size    = other.size;
 }
Exemple #4
0
        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]);
            }
        }