LogSum() 개인적인 메소드

private LogSum ( double lna, double lnc ) : double
lna double
lnc double
리턴 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);
        }