/** * @template T * @typedef {Object} DisjointSetPayload * @property {T} parent * @property {Set} children * @property {number} size */ /** * @template T * @class * @category Data Structures * @see {@link https://en.wikipedia.org/wiki/Disjoint-set_data_structure} */ export class DisjointSet { /** * @param {T[]?} elements */ constructor(elements?: T[] | null); /** * @private * @type {Map>} */ private _list; /** * @private * @param {T} x * @returns {DisjointSet} */ private make_set; /** * @param {T} x * @returns */ find(x: T): T | null; /** * @param {T} x * @param {T} y * @returns */ union(x: T, y: T): this; /** @param {T} x */ get_children(x: T): Set | null; } export type DisjointSetPayload = { parent: T; children: Set; size: number; }; //# sourceMappingURL=DisjointSet.d.ts.map