ASPL Manual v 1.00
© 2024 by SetSphere.COM


13. 4
   superset determines if a set is a super of another set

 

logo

superset a1 a2       where a1 a2 are set variables

superset  context  2  notcommu        ins:H_H_H  ret:context

●  superset determines if a set is a super of another set

Use the superset operator to check if a set variable is a superset of another set variable. The superset operator can be followed by two or more set variables, in which case the set variables are being compared pairwise going from left to right. This operator can be associated with two quantifiers: the 'mostly' quantifier that is used to reduce the matching of the elements to a specific percentage, and the 'loosely' quantifier that is used to ignore the group label when comparing the set variables. The command setcomparison can be typed at the ASPL prompt to list the set comparison operators along their quantifiers.

 

superset EXAMPLE1

In this example we will load the RANDONEBITMIX workspace and create some variables to get the unions of the three groups g1, g2, and g3. We will perform some operations to show the superset operation on the set variables.

 

superset OPERATION1

①  aspl> gu123 = gU g1 g2 g3

②  aspl> gu12 = gU g1 g2

③  aspl> superset gu123 gu12 g1

④  aspl> subset g1 gu12 gu123

 

superset EXAMPLE2

The unions of the three groups must include their intersection. We will assign the intersection to a set variable and show that the union of the three groups is a superset of their intersection.

 

superset OPERATION2

①  aspl> gu123 = gU g1 g2 g3

②  aspl> gu12 = gU g1 g2

③  aspl> fi12 = f& g1 g2

④  aspl> superset gu123 fi12

⑤  aspl> subset fi12 gu123

⑥  aspl> fi123 = f& g1 g2 g3

⑦  aspl> superset gu123 fi123

⑧  aspl> subset fi123 gu123

 

superset EXAMPLE3
A set variable foodir is assigned to the group of files found in the directory /tmp/testfinder/fuudir. The content of the directory is being altered and you need to determine if some files have been added to or deleted from that directory.

 

superset OPERATION3

aspl -wsname TESTGGDIR -groupingclass POSIX
    (start ASPL loading the sample workspace TESTGGDIR)

①  aspl> egCwhoami
    (ping the grouping class)

②  aspl> foodir = ggdir(dir,/tmp/testfinder/fuudir)
    (foodir set variable is assigned the directory /tmp/testfinder/fuudir)

③  aspl> ? foodir
    (interrogate foodir)

④  aspl> superset foodir foodir@1
    (is foodir a superset of its historical?)

⑤  aspl> subset foodir foodir@1
    (is foodir a subset of its historical?)

 

● SUPERSETNESS and its Amplifiers

This superset can be amplified by prefixing it with amplification syntax shown in the following table:

       a yellow note
Superset  determines if a set is a superset of a set or of a series of sets 
mostlySuperset  determines if a set is mostly a superset of a set or of a series of sets 
looselySuperset  determines if a set is loosly a superset of a set or of a series of sets 
mostlyLooselySuperset  determines if a set is mostly loosely a superset of a set or of a series of sets 
noeattrSuperset  determines if a set (ignoring the attributes) is a superset of a set or of a series of sets 
mostlyNoeattrSuperset  determines if a set (ignoring the attributes) is mostly a superset of a set or of a series of sets 
looselyNoeattrSuperset  determines if a set (ignoring the attributes) is loosely a superset of a set or of a series of sets 
mostlyLooselyNoeattrSuperset  determines if a set (ignoring the attributes) is mostly loosely a superset of a set or of a series of sets 
(C)2024 ASPL Inc.