| PRODUCT shared stuff | Subsystem list | Top level |
This file contains utilities for querying and manipulating lists (sets).
boolean
| LSTisSubset
| (list of anytype laListOne, list of anytype laListTwo)
|
list of anytype
| LSTgetRespectiveComplement
| (varargs of list of anytype laLists)
|
list of anytype
| LSTgetUnion
| (varargs of list of anytype laLists)
|
list of anytype
| LSTgetSymmetricDifference
| (varargs of list of anytype laLists)
|
list of anytype
| LSTgetIntersection
| (varargs of list of anytype laLists)
|
boolean LSTisSubset (list of anytype laListOne, list of anytype laListTwo);
laListOnelaListTwobIsSubset = LSTisSubset({1,2,3}, {0,1,2,3,4});
In this case, bIsSubset would be TRUE because each item in the first list
is found in the second list.
list of anytype LSTgetRespectiveComplement (varargs of list of anytype laLists);
laListsAn example of A-B:
lsComplement = LSTgetRespectiveComplement({"a","b","c","d","e","f","g","h","i","j"},
{"c","d","e","f","z"});
//lsComplement would be {"a","b","g","h","i","j"}.
An example of A-(B+C)
lsComplement = LSTgetRespectiveComplement({"a","b","c","d","e","f","g","h","i","j"},
{"c","d","e","f","z"}, {"i","j","k"});
//lsComplement would be {"a","b","g","h"}.
list of anytype LSTgetUnion (varargs of list of anytype laLists);
laLists//Union of 3 lists (A+B+C):
liUnion = LSTgetUnion({1,2,3,4,5,6}, {5,6,7,8}, {8,9,10});
//liUnion would be {1,2,3,4,5,6,7,8,9,10}.
//duplicate items are discarded (only listed once).
list of anytype LSTgetSymmetricDifference (varargs of list of anytype laLists);
laListsliDifference = LSTgetSymmetricDifference({1,2,3,4}, {3,4,5,6,7}, {7,8,9});
//liDifference would be {1,2,5,6,8,9}.
list of anytype LSTgetIntersection (varargs of list of anytype laLists);
laListsliIntersection = LSTgetIntersection({1,2,3,4,5}, {3,4,5,6,7}, {5,6,7,8,9});
//liIntersection would be {5}.