ASPL Manual v 1.00
© 2024 by SetSphere.COM


13. 22
   gmerge loosely merges set variables into a set variable using concatenaded group labels

 

logo

gmerge s1 [s2 .. sN] into targetvar       where s1 [s2 .. sN] targetvar are set variables

gmerge  setoid  1*t          ins:H_H_H  ous:H_H_H

●  Operator gmerge loosely merges set variables into a set variable using concatenaded group labels

Use the gmerge operator to merge one or many datasets into a dataset. This set operator can be followed by one or many set variables to be merged into a set variable. The landing group label names (Lgn) of the set-variables are being concatenated then used as the landing-group-label of the resulting variable. Note also that when merging groups some label of subgroups, and some element names may be overwritten. This operator can be labinated by preceding it or following it with comma, for example ,gmerge or gmerge, are equivaleent and will labinate the merged group labels. See also gU and its labinated form gU, to get the union of groups.

 

gmerge EXAMPLE1

The following example shows how to gmerge three set variables into one. In the following operation we load the sample workspace WS1.

 

gmerge OPERATION1

aspl WS1
    (start ASPL loading the WS1 workspace)

①  aspl> gmerge a1 a2 a3 into a123
    (gmerge a1 a2 a3 into set variable a123 )

②  aspl> u123 = gU a1 a2 a3
    (get the group union of a1 a2 a3 and assign it to u123)

③  aspl> v
    (view symbol table)

④  aspl> equal a123 u123
    (compare set equality of a123 and u123)

 

gmerge EXAMPLE2

The following example shows how to gmerge three set variables into one. In the following operation we will load the sample workspace RANDONEBITMIX.

 

gmerge OPERATION2

aspl RANDONEBITMIX
    (start ASPL loading the RANDONEBITMIX workspace)

①  aspl> merge g1 g2 g3 into mer123
    (merge g1 g2 g3 into mer123)

②  aspl> lmerge g1 g2 g3 into lmer123
    (loosely merge)

③  aspl> gmerge g1 g2 g3 into gmer123
    (group merge)

④  aspl> v
    (view symbol table)

⑤  aspl> equal gmer123 lmer123
    (compare set equality between gmer123 and lmer123)

⑥  aspl> looselyEqual gmer123 lmer123
    (compare loosely set equality by ignoring the group labels)

⑦  aspl> sim gmer123 lmer123
    (show the similarity between gmer123 lmer123)

⑧  aspl> ,gU gmer123 lmer123
    (labinate and display the group union between gmer123 and lmer123)

⑨  aspl> gu123 = gU g1 g2 g3
    (get the group union between g1 g2 g3)

⑩  aspl> equal gu123 mer123
    (determine set equality between gu123 mer123)