FuzzyModule class

Class for representing a fuzzy module. Instances of this class are used by game entities for fuzzy inference. A fuzzy module is a collection of fuzzy variables and the rules that operate on them.

@author {@link https://github.com/Mugen87|Mugen87}

Constructors

FuzzyModule()

Properties

flvs Map<String, FuzzyVariable>
final
hashCode int
The hash code for this object.
no setterinherited
rules List<FuzzyRule>
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

addFLV(String name, FuzzyVariable flv) FuzzyModule
Adds the given FLV under the given name to this fuzzy module.
addRule(FuzzyRule rule) FuzzyModule
Adds the given fuzzy rule to this fuzzy module.
defuzzify(String name, [FuzzyModuleType type = FuzzyModuleType.maxav]) double
Given a fuzzy variable and a defuzzification method this returns a crisp value.
fromJSON(Map<String, dynamic> json) FuzzyModule
Restores this instance from the given JSON object.
fuzzify(String name, double value) FuzzyModule
Calls the fuzzify method of the defined FLV with the given value.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
removeFLV(String name) FuzzyModule
Remove the FLV under the given name from this fuzzy module.
removeRule(FuzzyRule rule) FuzzyModule
Removes the given fuzzy rule from this fuzzy module.
toJSON() Map<String, dynamic>
Transforms this instance into a JSON object.
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited