Exemple #1
0
        public static double ComputeEur(DuongMethodEnum method, double[] x, double[] y, double tf)
        {
            if (x.Length != y.Length)
            {
                return(double.MinValue);
            }

            return(ComputeDuongEur((int)method, x, y, x.Length, tf));
        }
Exemple #2
0
        public static double[] ComputeForecast(DuongMethodEnum method, double[] x, double[] y, double[] future)
        {
            if (x.Length != y.Length)
            {
                return(null);
            }

            var    result          = new double[future.Length];
            IntPtr computeForecast = ComputeDuongForecast((int)method, x, y, x.Length, future, future.Length);

            Marshal.Copy(computeForecast, result, 0, future.Length);
            ReleaseMemory(computeForecast);
            return(result);
        }