Skip to main content

Module membership

Module membership 

Source
Expand description

Membership functions for fuzzy FILTERs — map a crisp numeric value (e.g. an age, a distance, a similarity score bound to a query variable) to a degree in [0, 1]. These produce the per-solution degree that the super::solution algebra then composes. They are query-layer primitives (value → degree); the logic operators that combine degrees are reused from crate::modalities::fuzzy.

Functions§

approximately
“≈ target” with tolerance tol: a symmetric triangle peaking at target, reaching 0 at target ± tol. tol <= 0 is a crisp equality.
much_greater_than
“Much greater than reference”: rises from 0 at reference to 1 at reference + spread.
much_less_than
“Much less than reference”: falls from 1 at reference − spread to 0 at reference.
ramp_down
Falling ramp: 1 at/below a, 0 at/above b (a < b). “At most about a”.
ramp_up
Rising ramp: 0 at/below a, 1 at/above b, linear between (a < b). Use for “at least about b” predicates. If a >= b, behaves as a crisp step at a.
trapezoidal
Trapezoidal membership: 0 below a, rising on [a, b], plateau 1 on [b, c], falling on [c, d], 0 above d. Requires a <= b <= c <= d.
triangular
Triangular membership: peak 1 at m, falling to 0 at a (left) and b (right), 0 outside [a, b]. Requires a <= m <= b.