- 1 :
/**
- 2 :
* Base class for representing a term in a {@link FuzzyRule}.
- 3 :
*
- 4 :
* @author {@link https://github.com/Mugen87|Mugen87}
- 5 :
*/
- 6 :
class FuzzyTerm {
- 7 :
- 8 :
/**
- 9 :
* Clears the degree of membership value.
- 10 :
*
- 11 :
* @return {FuzzyTerm} A reference to this term.
- 12 :
*/
- 13 :
clearDegreeOfMembership() {}
- 14 :
- 15 :
/**
- 16 :
* Returns the degree of membership.
- 17 :
*
- 18 :
* @return {Number} Degree of membership.
- 19 :
*/
- 20 :
getDegreeOfMembership() {}
- 21 :
- 22 :
/**
- 23 :
* Updates the degree of membership by the given value. This method is used when
- 24 :
* the term is part of a fuzzy rule's consequent.
- 25 :
*
- 26 :
* @param {Number} value - The value used to update the degree of membership.
- 27 :
* @return {FuzzyTerm} A reference to this term.
- 28 :
*/
- 29 :
updateDegreeOfMembership( /* value */ ) {}
- 30 :
- 31 :
/**
- 32 :
* Transforms this instance into a JSON object.
- 33 :
*
- 34 :
* @return {Object} The JSON object.
- 35 :
*/
- 36 :
toJSON() {
- 37 :
- 38 :
return {
- 39 :
type: this.constructor.name
- 40 :
};
- 41 :
- 42 :
}
- 43 :
- 44 :
}
- 45 :
- 46 :
export { FuzzyTerm };