FuzzySet()

A Fuzzy set.

new FuzzySet()

Do not use the constructor of this class, use FuzzyLogic.newSet to create a new set.
Most of the time you won't need to access the properties nor use the methods of this class, but use the methods of FuzzyLogic, FuzzyValue, FuzzyVeracity
Properties:
Name Type Description
name string The name of this set .
valueNOT Number One of the closest value which is not in the set (either above or below).
valueIS Number The value which best fits in the set, the most extreme/maximum in the set.
shape FuzzyShape The shape (i.e. interpolation or transition) when getting in (below) the set.
shapeAbove FuzzyShape The shape (i.e. interpolation or transition) when getting out (above) of the set.
plateauMin Number The value above which a value is considered completely included.
plateauMax Number The value under which a value is considered completely included.

Methods

contains(v, quantifieropt) → {FuzzyVeracity}

Checks if a value is contained in the set.
Parameters:
Name Type Attributes Default Description
v Number | FuzzyValue The value to test.
quantifier FuzzyQuantifier | Number <optional>
FuzzyQuantifier.NONE Checks in which part of the set the value is in.
Returns:
FuzzyVeracity - The veracity.

crispify(quantifieropt, veracityopt) → {Array.<Number>}

Gets a list of precise values from the set corresponding to the quantifier
Parameters:
Name Type Attributes Default Description
quantifier FuzzyModifier <optional>
FuzzyModifier.AVERAGE The quantifier
veracity FuzzyVeracity | Number <optional>
0.5 The veracity
Returns:
Array.<Number> - The list of possible crisp values, ordered from min to max.

getValues(veracityopt) → {Array.<Number>}

Gets a list of precise values from the set corresponding to the given veracity.
Parameters:
Name Type Attributes Default Description
veracity FuzzyVeracity | Number <optional>
0.5 The veracity
Returns:
Array.<Number> - The list of possible crisp values, ordered from min to max.

quantify(val) → {FuzzyQuantifier}

Gets the closest quantifier to this value
Parameters:
Name Type Description
val Number | FuzzyValue The value to quantify
Returns:
FuzzyQuantifier - The quantifier

toString() → {string}

Gets the name of this set.
Returns:
string - The name of the set.