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); }
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); }
public FuzzySubexpression AddPremise(FuzzyConnectiveType conjunction, FuzzyValue fuzzyValue = null) => this.AddPremiseImpl(conjunction, fuzzyValue);
public FuzzySubexpression AddPremise(FuzzyValue fuzzyValue) => this.AddPremiseImpl(null, fuzzyValue);