LogSum() private method

private LogSum ( double lna, double lnc ) : double
lna double
lnc double
return double
コード例 #1
0
        public static double LogSumExp(this double[] array)
        {
            double sum = Double.NegativeInfinity;

            for (int i = 0; i < array.Length; i++)
            {
                sum = Special.LogSum(array[i], sum);
            }
            return(sum);
        }
コード例 #2
0
        public static double LogSum(double[] values)
        {
            double logsum = Double.NegativeInfinity;

            for (int i = 0; i < values.Length; i++)
            {
                logsum = Special.LogSum(logsum, values[i]);
            }
            return(logsum);
        }