Accord.Fuzzy.Rule.Priority C# (CSharp) Method

Priority() private method

Defines the priority of the fuzzy operators.
private Priority ( string Operator ) : int
Operator string A fuzzy operator or openning parenthesis.
return int
        private int Priority( string Operator )
        {
            // if its unary
            if ( unaryOperators.IndexOf( Operator ) >= 0 )
                return 4;

            switch ( Operator )
            {
                case "(": return 1;
                case "OR": return 2;
                case "AND": return 3;
            }
            return 0;
        }