new FuzzyRule(antecedent, consequence)
Constructs a new fuzzy rule with the given values.
Parameters:
Name | Type | Default | Description |
---|---|---|---|
antecedent |
FuzzyTerm | null | Represents the condition of the rule. |
consequence |
FuzzyTerm | null | Describes the consequence if the condition is satisfied. |
Members
-
nullable antecedent :FuzzyTerm
-
Represents the condition of the rule.
- Default Value:
- null
-
nullable consequence :FuzzyTerm
-
Describes the consequence if the condition is satisfied.
- Default Value:
- null
Methods
-
evaluate() → {FuzzyRule}
-
Evaluates the rule and updates the degree of membership of the consequent term with the degree of membership of the antecedent term.
-
fromJSON(json, fuzzySets) → {FuzzyRule}
-
Restores this instance from the given JSON object.
Parameters:
Name Type Description json
Object The JSON object.
fuzzySets
Map.<String, FuzzySet> Maps fuzzy sets to UUIDs.
-
initConsequence() → {FuzzyRule}
-
Initializes the consequent term of this fuzzy rule.
-
toJSON() → {Object}
-
Transforms this instance into a JSON object.
Returns:
Object -The JSON object.