37 Smooth parameterized fuzzy quantifier using quadratic transition.
40 - x: float or np.array
41 Input value(s), typically in [0, 1].
43 Start of the transition (0 <= alpha < beta <= 1).
45 End of the transition.
48 - float or np.array: Degree of membership.
51 mid = (alpha + beta) / 2
52 denom = (beta - alpha) ** 2
54 result = np.zeros_like(x)
60 mask2 = (x > alpha) & (x <= mid)
61 result[mask2] = 2 * ((x[mask2] - alpha) ** 2) / denom
64 mask3 = (x > mid) & (x <= beta)
65 result[mask3] = 1 - 2 * ((x[mask3] - beta) ** 2) / denom