|
|
|||||||||||||
Class SetComparerpublic final class SetComparer { // Methods public static int compareSets (ProvideSetComparisonInfo set1, ProvideSetComparisonInfo set2); } This class compares sets that cannot be subtracted or otherwise have no "inverse" operator. The pseudo-set implements ProvideSetComparisonInfo and consists of two sets that together dictate membership. The include set defines an enclosing set for all possible members of the set, and the exclude set defines members of the enclosing set that are removed. Three basic operations are supported on the two sets using this class.
The compareSets operator method makes the assumption that the union is relatively inexpensive to compute and intersection is relatively expensive. The include set is assumed to be an inclusive superset of the exclude set (otherwise, incorrect results might be returned). Because comparison is typically expensive, this invariant is not checked. MethodscompareSetspublic static int compareSets (ProvideSetComparisonInfo set1, ProvideSetComparisonInfo set2);
|
© 1998 Microsoft Corporation. All rights reserved. Terms of use. |