Table of Contents

Class FuzzyInput

Namespace
Olve.Fuzzy
Assembly
Olve.Fuzzy.dll

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

valueFunction Func<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

IReadOnlyDictionary<int, IMemberFunction>

Value

Gets the current crisp value of the input.

public double Value { get; }

Property Value

double

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

antecedent int

The key of the antecedent.

Returns

ICondition

The condition.

Exceptions

ArgumentException

Thrown when antecedent is not set.

IsNot(int)

Creates a condition that is the negation (1 - truth) of Is(int).

public ICondition IsNot(int antecedent)

Parameters

antecedent int

The key of the antecedent.

Returns

ICondition

The negated condition.

Exceptions

ArgumentException

Thrown when antecedent is not set.

Set(int, IMemberFunction)

Sets the member function for antecedent.

public void Set(int antecedent, IMemberFunction memberFunction)

Parameters

antecedent int

The key of the antecedent, e.g. a constant for "low".

memberFunction IMemberFunction

The member function of the antecedent.

Exceptions

ArgumentException

Thrown when antecedent is already set.