Beispiel #1
0
        public FuzzySubexpression AddConclusion(FuzzyValue fuzzyValue)
        {
            FuzzySubexpression fs;

            if (this.conclusion.Count == 0)
            {
                fs = new FuzzySubexpression(FuzzyConnectiveType.None, fuzzyValue);
            }
            else
            {
                fs = new FuzzySubexpression(FuzzyConnectiveType.And, fuzzyValue);
            }

            this.conclusion.Add(fs);
            return(fs);
        }
Beispiel #2
0
        private FuzzySubexpression AddPremiseImpl(FuzzyConnectiveType?conjunction, FuzzyValue fuzzyValue)
        {
            FuzzySubexpression subexpr;

            if (this.premise.Count == 0)
            {
                subexpr = new FuzzySubexpression(FuzzyConnectiveType.None, fuzzyValue);
            }
            else
            {
                subexpr = new FuzzySubexpression(conjunction ?? FuzzyConnectiveType.And, fuzzyValue);
            }

            this.premise.Add(subexpr);
            return(subexpr);
        }
Beispiel #3
0
 public FuzzySubexpression AddPremise(FuzzyConnectiveType conjunction, FuzzyValue fuzzyValue = null)
 => this.AddPremiseImpl(conjunction, fuzzyValue);
Beispiel #4
0
 public FuzzySubexpression AddPremise(FuzzyValue fuzzyValue)
 => this.AddPremiseImpl(null, fuzzyValue);