/// <summary> /// Shepard 2d interpolant. /// </summary> /// <param name="xd">the data point[M*ND], M: the spatial dimension, ND: the number of data points</param> /// <param name="zd">data values[ND]</param> /// <param name="p">power</param> /// <param name="xi">interpolation points[M*NI], NI: the number of interpolation points</param> /// <returns>interpolated values[NI]</returns> public static View <float, TExecutionSpace> Shepard2d(View <float, TExecutionSpace> xd, View <float, TExecutionSpace> zd, float p, View <float, TExecutionSpace> xi) { nint result = KokkosLibrary.Shepard2dSingle(xd.Pointer, zd.Pointer, p, xi.Pointer, executionSpace); NdArray ndArray = View <float, TExecutionSpace> .RcpConvert(result, 1); View <float, TExecutionSpace> zi = new View <float, TExecutionSpace>(new NativePointer(result, sizeof(float) * xi.Size()), ndArray); return(zi); }