Exemplo n.º 1
0
        public void Apply(List <LinguisticVariable> LingVars)
        {
            string    numericRule = this.numericRule(LingVars);
            Tokenizer ruleTokens  = Tokenizer.tokenize(numericRule);

            this.membershipValue.fuzzy = FuzzyEvaluator.computeExpr(ruleTokens, 1, this.fOperator, false);
        }
Exemplo n.º 2
0
        public void computeExpr()
        {
            string    testString = "not 23.5 or ( 3.5 and 0.004 ) and ( 32 or ( 0.3 and 0.012 ) )";
            Tokenizer tokened    = Tokenizer.tokenize(testString);
            double    result     = FuzzyEvaluator.computeExpr(tokened, 1, FuzzyOperator.Probabilistic, false);

            Debug.Log("[Fuzzy Evaluator Calculation Test Result] \n" +
                      testString + " = " + result);
        }