@thi.ng/fuzzy
Version:
Fuzzy logic operators & configurable rule inferencing engine
37 lines • 1.83 kB
TypeScript
import type { DefuzzStrategy, DefuzzStrategyOpts } from "../api.js";
/**
* Higher-order function: Bisector-of-Area defuzzification strategy. Returns
* strategy which computes the integral of a given fuzzy set in the defined
* `[min,max]` domain and returns the position of the bisector which partitions
* the area into 2 equal halves. The domain is sampled at `opts.samples`
* uniformly spaced points.
*
* @remarks
* Use `samples` option to adjust precision.
*
* Also see {@link DefuzzStrategyOpts}
*
* @example
* ```ts tangle:../../export/bisector-strategy.ts
* import { bisectorStrategy, trapezoid } from "@thi.ng/fuzzy";
*
* console.log(
* bisectorStrategy()(trapezoid(0,1,5,6), [0,6])
* );
* // 2.97
*
* // ......▁█████████████|█████████████▁.....
* // ......██████████████|██████████████.....
* // .....███████████████|███████████████....
* // ....▇███████████████|███████████████▇...
* // ...▅████████████████|████████████████▅..
* // ..▃█████████████████|█████████████████▃.
* // .▁██████████████████|██████████████████▁
* // .███████████████████|███████████████████
* // ^ 2.97
* ```
*
* @param opts -
*/
export declare const bisectorStrategy: (opts?: Partial<DefuzzStrategyOpts>) => DefuzzStrategy;
//# sourceMappingURL=bisector.d.ts.map