在RightShoulderFuzzySet类中,representativeValue是一个方法,用于计算模糊集的代表值,即右肩模糊集的峰值。
该方法没有参数。
该方法返回峰值点的值,表示右肩模糊集的中心点。
const set = new RightShoulderFuzzySet(10, 20, 30);
const representativeValue = set.representativeValue(); // 返回 25
在上述代码中,我们创建了一个右肩模糊集 set,其中峰值点为 20 ,调用 set.representativeValue() 方法,会返回代表值为 25。
representativeValue 方法仅适用于右肩模糊集。