Class FuzzyInput
A fuzzy input variable: a crisp value read through a function, and member functions keyed by antecedent.
public sealed class FuzzyInput
- Inheritance
-
FuzzyInput
- Inherited Members
Constructors
FuzzyInput(Func<double>)
A fuzzy input variable: a crisp value read through a function, and member functions keyed by antecedent.
public FuzzyInput(Func<double> valueFunction)
Parameters
valueFunctionFunc<double>Returns the current crisp value of the input. It is called on every evaluation.
Properties
MemberFunctions
Gets the member functions of the input, keyed by antecedent.
public IReadOnlyDictionary<int, IMemberFunction> MemberFunctions { get; }
Property Value
Value
Gets the current crisp value of the input.
public double Value { get; }
Property Value
Methods
Is(int)
Creates a condition that is true to the degree the input is a member of antecedent.
public ICondition Is(int antecedent)
Parameters
antecedentintThe key of the antecedent.
Returns
- ICondition
The condition.
Exceptions
- ArgumentException
Thrown when
antecedentis not set.
IsNot(int)
Creates a condition that is the negation (1 - truth) of Is(int).
public ICondition IsNot(int antecedent)
Parameters
antecedentintThe key of the antecedent.
Returns
- ICondition
The negated condition.
Exceptions
- ArgumentException
Thrown when
antecedentis not set.
Set(int, IMemberFunction)
Sets the member function for antecedent.
public void Set(int antecedent, IMemberFunction memberFunction)
Parameters
antecedentintThe key of the antecedent, e.g. a constant for "low".
memberFunctionIMemberFunctionThe member function of the antecedent.
Exceptions
- ArgumentException
Thrown when
antecedentis already set.