Table of Contents

Class FuzzyOutput

Namespace
Olve.Fuzzy
Assembly
Olve.Fuzzy.dll

A fuzzy output variable: member functions keyed by consequent, defuzzified with the centroid method.

public sealed class FuzzyOutput
Inheritance
FuzzyOutput
Inherited Members

Remarks

Rules attach their conditions to the output's consequents, so the output holds the rule set. Build a new output (and its rules) per rule set; an output is not safe to share across threads.

Methods

Evaluate()

Evaluates all rules attached to this output and defuzzifies the result.

public double Evaluate()

Returns

double

The crisp output value, or 0 when no rule is active.

Is(int)

Gets the consequent for consequent, to be used with Then(IConsequent).

public IConsequent Is(int consequent)

Parameters

consequent int

The key of the consequent.

Returns

IConsequent

The consequent.

Exceptions

KeyNotFoundException

Thrown when consequent is not set.

Set(int, IHasCentroid)

Sets the member function for consequent.

public void Set(int consequent, IHasCentroid memberFunction)

Parameters

consequent int

The key of the consequent, e.g. a constant for "high".

memberFunction IHasCentroid

The member function of the consequent.

Exceptions

ArgumentException

Thrown when consequent is already set.