Beispiel #1
0
 /// <summary>
 /// Set coefficient by fuzzy variable
 /// </summary>
 /// <param name="var">Fuzzy variable</param>
 /// <param name="coeff">New value of the coefficient</param>
 public void SetCoefficient(FuzzyVariable var, double coeff)
 {
     if (var == null)
     {
         _constValue = coeff;
     }
     else
     {
         _coeffs[var] = coeff;
     }
 }
Beispiel #2
0
 /// <summary>
 /// Get coefficient by fuzzy variable
 /// </summary>
 /// <param name="var">Fuzzy variable</param>
 /// <returns>Coefficient's value</returns>
 public double GetCoefficient(FuzzyVariable var)
 {
     if (var == null)
     {
         return(_constValue);
     }
     else
     {
         return(_coeffs[var]);
     }
 }
 /// <summary>
 /// Create a single condition
 /// </summary>
 /// <param name="var">A linguistic variable to which the condition is related</param>
 /// <param name="term">A term in expression 'var is term'</param>
 /// <param name="not">Does condition contain 'not'</param>
 /// <param name="hedge">Hedge modifier</param>
 /// <returns>Generated condition</returns>
 public FuzzyCondition CreateCondition(FuzzyVariable var, FuzzyTerm term, bool not, HedgeType hedge)
 {
     return(new FuzzyCondition(var, term, not, hedge));
 }
 /// <summary>
 /// Create a single condition
 /// </summary>
 /// <param name="var">A linguistic variable to which the condition is related</param>
 /// <param name="term">A term in expression 'var is term'</param>
 /// <param name="not">Does condition contain 'not'</param>
 /// <returns>Generated condition</returns>
 public FuzzyCondition CreateCondition(FuzzyVariable var, FuzzyTerm term, bool not)
 {
     return(new FuzzyCondition(var, term, not));
 }