import { EastFunction, IntersectFunction, NewSetFunction, SetDiffFunction, SubsetEqualFunction, SymDiffFunction, ToSetFunction, UnionFunction, Variable } from '../functions'; import { ArrayType, BooleanType, DictType, IntegerType, SetType, StringType } from '../types'; import { Expression } from './core'; /** * Construct a new set with given `values`. * * @param key_type the {@link EastType} of the elements of the set * @param keys a list of {@link Expression}s to insert as keys into the new set (optional) * * @category Expression * * @example * ```typescript * // create a new empty set that can contain strings * NewSet(StringType) * // create a new set containing ["a", "b"] * NewSet(StringType, [Const("a"), Const("b")]) * ``` */ export declare function NewSet(key_type: T, keys?: Iterable>): NewSetFunction>; /** * Return a set where each output `key` is calculated from elements of the input `collection`. * Duplicate and null output keys are ignored. * * @param collection the {@link EastFunction} for the input set * @param key a function from input key to an {@link Expression} to calculate the output key * * @category Expression * * @example * ```typescript * // create a new set containing uppercase versions of the input elements * ToSet(set, x => UpperCase(x)) * ``` */ export declare function ToSet) => EastFunction>(collection: EastFunction, key: KOut): ToSetFunction["type"]>>; /** * Return a set where each output `key` is calculated from elements of the input `collection`. * Duplicate and null output keys are ignored. * * @param collection the {@link EastFunction} for the input dictionary * @param key a function from input value and key to an {@link Expression} to calculate the output key * * @category Expression * * @example * ```typescript * // create a new set containing uppercase versions of the keys of the dictionary * ToSet(dict, (value, key) => UpperCase(key)) * ``` */ export declare function ToSet, key: Variable) => EastFunction>(collection: EastFunction, key: KOut): ToSetFunction["type"]>>; /** * Return a set where each output `key` is calculated from elements of the input `collection`. * Duplicate and null output keys are ignored. * * @param collection the {@link EastFunction} for the input array * @param key a function from input value and key to an {@link Expression} to calculate the output key * * @category Expression * * @example * ```typescript * // create a new set containing the elements of the array (duplicates will be discarded) * ToSet(array) * // create a new set containing uppercase versions of the elements of the array * ToSet(array, x => UpperCase(x)) * ``` */ export declare function ToSet, key: Variable) => EastFunction>(collection: EastFunction, key: KOut): ToSetFunction["type"]>>; /** * Return `true` if the `first` set is a subset, or equal to, the `second` set. * * @param first the {@link Expression} for the first set * @param second the {@link Expression} for the second set * * @category Expression * * @example * ```typescript * SubsetEqual(set1, set2) * ``` */ export declare function SubsetEqual(first: EastFunction, second: EastFunction): SubsetEqualFunction; /** * Return a set which is the union of `first` and `second`. * * @param first the {@link Expression} for the first set * @param second the {@link Expression} for the second set * * @category Expression * * @example * ```typescript * Union(set1, set2) * ``` */ export declare function Union(first: EastFunction, second: EastFunction): UnionFunction; /** * Return a set which is the intersection of `first` and `second`. * * @param first the {@link Expression} for the first set * @param second the {@link Expression} for the second set * * @category Expression * * @example * ```typescript * Intersect(set1, set2) * ``` */ export declare function Intersect(first: EastFunction, second: EastFunction): IntersectFunction; /** * Return a set which is the set difference of `first` and `second`. * * @param first the {@link Expression} for the first set * @param second the {@link Expression} for the second set * * @category Expression * * @example * ```typescript * SetDiff(set1, set2) * ``` */ export declare function SetDiff(first: EastFunction, second: EastFunction): SetDiffFunction; /** * Return a set which is the symmetric difference of `first` and `second`. * * @param first the {@link Expression} for the first set * @param second the {@link Expression} for the second set * * @category Expression * * @example * ```typescript * SymDiff(set1, set2) * ``` */ export declare function SymDiff(first: EastFunction, second: EastFunction): SymDiffFunction;