コード例 #1
0
        private static float GetValueOfPredicate(FuzzyInputData fuzzyInput, FuzzyPredicate predicate)
        {
            float value = 0;

            switch (predicate.isOrIsNot)
            {
            case FuzzyPredicate.IsOrIsNot.Is:
                value = ValueIsRule(fuzzyInput, predicate);
                break;

            case FuzzyPredicate.IsOrIsNot.IsNot:
                value = ValueIsNotRule(fuzzyInput, predicate);
                break;
            }

            return(value);
        }
コード例 #2
0
 private static float ValueIsNotRule(FuzzyInputData fuzzyInput, FuzzyPredicate predicate) => (!fuzzyInput[predicate.input])[predicate.state];