/** * Copyright (c) 2018-2024 mol* contributors, licensed under MIT, See LICENSE file for more info. * * @author Alexander Rose */ export declare namespace SetUtils { function toArray(set: ReadonlySet): T[]; /** Test if set a contains all elements of set b. */ function isSuperset(setA: ReadonlySet, setB: ReadonlySet): boolean; /** Add all elements from `sets` to `out` */ function add(out: Set, ...sets: ReadonlySet[]): Set; /** Create set containing elements of both set a and set b. */ function union(setA: ReadonlySet, setB: ReadonlySet): Set; function unionMany(...sets: ReadonlySet[]): Set; function unionManyArrays(arrays: T[][]): Set; /** Create set containing elements of set a that are also in set b. */ function intersection(setA: ReadonlySet, setB: ReadonlySet): Set; function areIntersecting(setA: ReadonlySet, setB: ReadonlySet): boolean; function intersectionSize(setA: ReadonlySet, setB: ReadonlySet): number; /** Create set containing elements of set a that are not in set b. */ function difference(setA: ReadonlySet, setB: ReadonlySet): Set; /** Number of elements that are in set a but not in set b. */ function differenceSize(setA: ReadonlySet, setB: ReadonlySet): number; /** Test if set a and b contain the same elements. */ function areEqual(setA: ReadonlySet, setB: ReadonlySet): boolean; }