Dynamic_Games.PAES.compare_max_Pareto C# (CSharp) Method

compare_max_Pareto() private method

private compare_max_Pareto ( double first, double second, int n ) : int
first double
second double
n int
return int
        int compare_max_Pareto(double[] first, double[] second, int n)
        {
            // as for compare_min() but for maximization problems

            int deflt = 0;
            int current;
            int i = 0;
            do
            {
                if (first[i] > second[i])
                    current = 1;
                else if (second[i] > first[i])
                    current = -1;
                else
                    current = 0;
                if ((current != 0) && (current == ((-1) * deflt)))
                {
                    return (0);
                }
                if (current != 0)
                {
                    deflt = current;
                }
                i++;
            } while (i < n);
            return (deflt);
        }