ASPL Programming ver 1.00
© 2024 Bassem W. Jamaleddine


13. 1
   equal determines if two sets are equal

 

logo

equal a1 a2       where a1 a2 are set variables

equal`mtm~ a1 a2

equal/mtm~ a1 a2

equal

When specified by itself then get the <>> the object on top of stack with the one one below top of stack then push result on the stack

equal  context  2  commu        ins:H_H_H  ret:context

●  Operator equal determines if two sets are equal

Use this equal to etcetctetcUse the equal to find the ... blablabla and you can refer to the subgroup intersection in WARN: IN operation_1_equal.raw THE FOLLOWING Ref: CANNOT BE RESOLVED
   <Ref:-see section -chaptit "d& get the subgroups intersection " -ptt "d& get the subgroups intersection" />
and see about similarity example WARN: IN operation_1_equal.raw THE FOLLOWING Ref: CANNOT BE RESOLVED
   <Ref:-see example -chaptit "similarity calculates the similarities of one or more set variables" -ptt "similarity EXAMPLE" />
or you can see the operation WARN: IN operation_1_equal.raw THE FOLLOWING Ref: CANNOT BE RESOLVED
   <Ref:-see operation -chaptit "similarity calculates the similarities of one or more set variables" -ptt "similarity OPERATION" />
and that is it!

 

equal Example

TRASH TEMPLATE THAT NEEDS TO BE EDITED

The following example shows how to display the files in two directories that have the same content. These files may be located in different directories and may have different names.

 

equal Operation

TRASH TEMPLATE THAT NEEDS TO BE EDITED

①  aspl> a12 = f& a1 a2
    (a12 is assigned the intersection of a1 a2)

②  aspl> display a12
    (print out a12)

       Figure spheres3d.png
full view

Image File

 -F- Fig. 13.1.1   [Figure operation_1_equal]
ASPL (C) 2024 Bassem Jamaleddine

③  aspl> v a12
    (view internals of set variable a12)

       code shebang resizable w.o. cross

(raw text)
1.    . #!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11111111 
      -extendedsimilarity -assignonce -nostrictld -jZ -noansi 
2.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11111111 
      -extendedsimilarity -assignonce -nostrictld -logfile aspl-date.log -jZ 
3.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11001100 
      -extendedsimilarity 
4.    . ;;#!/opt/ASPLv1.00/bin/aspl -script /opt/ASPLv1.00/junk/ex2.aspl  
      -tattler 
5.    . ;;#!/opt/ASPLv1.00/bin/aspl -wsdir /ffff/foo.as  -tattler
6.    . ;;#!/opt/ASPLv1.00/bin/aspl -wsname WS1 -tattler
7.    . 
8.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1
9.    . 
10.   . ;;#!/opt/ASPLv1.00/bin/aspl -verbose WS1 
11.   . ;;#!/opt/ASPLv1.00/bin/aspl -verbose WS5 
12.   . ;;#!/opt/ASPLv1.00/bin/aspl WS5 -verbose                     WRONG 
13.   . 
14.   . 
15.   . ;;#!/opt/ASPLv1.00/bin/aspl -wsname WS5 -globalvar
16.   . 
17.   . ;; /opt/ASPLv1.00/ex1.aspl /tmp/aa1 /tmp/aa4
18.   . 
      ;;*********************************************************************** 
19.   . ;;   excurl.aspl
20.   . ;;
21.   . ;;   Using DEF
22.   . ;;   Using Curly Set Expression Demo
23.   . ;;
24.   . ;;   Copyright © 2020-2021 Bassem W. Jamaleddine
25.   . ;;   Copyright © 2021 Total Computing & Network Design, Inc.
26.   . ;;   All rights reserved.
27.   . ;;
28.   . 
      ;;*********************************************************************** 
29.   . 
30.   . attachlog +aspl-date.log
31.   . trace 1
32.   . load WS1
33.   . f& a1 a2 a3
34.   . endscript
35.   . 
36.   . load WS1
37.   . v
38.   . load WS5
39.   . v
40.   . endscript
41.   . 
42.   . ;; /opt/ASPLv1.00/ex1.aspl /tmp/TX/27238-tx.jar /tmp/TX/38141-tx.jar
43.   . 
44.   . ;;d1 = ggjar(jarfile,$1,calchksum,1,calentropy,1)
45.   . ;;d2 = ggjar(jarfile,$2,calchksum,1,calentropy,1)
46.   . ;;d1 = ggdir $1
47.   . ;;d2 = ggdir $2
48.   . 
49.   . sequencing lcs
50.   . f%U d1 d2
51.   . density d1 d2
52.   . sim d1 d2
53.   . endscript
54.   . 
55.   . 
56.   . ;;FN pp()
57.   . ;;FN pp3(a2,a3,a4)
58.   . 
59.   . displayoff
60.   . ;FN pp(); FN pp3(a2,a3,a4);v
61.   . #f& a2 a4;
62.   . 
63.   . def pp := a12 = f& a1 a2; a23 = f& a2 a3; a123 = f& a12 a23
64.   . def pp3 := x12 = f& %%1 %%2; x23 = f& %%2 %%3; x123 = f& x12 x23
65.   . 
66.   . endscript
67.   . 
68.   . ;; d1 = ggdir $SHELL:V1
69.   . ;; d2 = ggdir $SHELL:V2
70.   . ;; f%& d1 d2
71.   . ;; endscript
72.   . 
73.   . ;; aspl script
74.   . ;; script /opt/ASPLv1.00/script.aspl
75.   . 
76.   . load WS1
77.   . v
78.   . load WS5
79.   . v
80.   . 
81.   . endscript
82.   . 
83.   . 


                           Ticking Similarity With Predicates (see table)


_  the set element names are the file containment names 
ffl  the set element names are the file containment names 
f  the set element names are the named files 
c  the set element names are the checksums of the named files 
z  the set element names are the zsums of the named files 
fflz  the set element names are the file containment names AND their zsums 
dosi  the set element names are the document similarities of the named files 
h  the set element names are the entropies of the named files 
c  the set element names are the checksums of the named files 
fc  the set element names are the named files AND their checksums 
fflc  the set element names are the file containment names AND their checksums 
fflmtm  the set element names are the file containment names AND their modification time 
mtm  the set element names are the modification times of the named files 
fmtm  the set element names are the named files AND their modification times 
d  the set element names are the containment path of the named files 
dmtm  the set element names are the containment path AND the modification times of the named files 



       code in full shebang w./o cross

(raw text)
1.    . #!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11111111 
      -extendedsimilarity -assignonce -nostrictld -jZ -noansi 
2.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11111111 
      -extendedsimilarity -assignonce -nostrictld -logfile aspl-date.log -jZ 
3.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1 -tattler -verbose -gB 11001100 
      -extendedsimilarity 
4.    . ;;#!/opt/ASPLv1.00/bin/aspl -script /opt/ASPLv1.00/junk/ex2.aspl  
      -tattler 
5.    . ;;#!/opt/ASPLv1.00/bin/aspl -wsdir /ffff/foo.as  -tattler
6.    . ;;#!/opt/ASPLv1.00/bin/aspl -wsname WS1 -tattler
7.    . 
8.    . ;;#!/opt/ASPLv1.00/bin/aspl WS1
9.    . 
10.   . ;;#!/opt/ASPLv1.00/bin/aspl -verbose WS1 
11.   . ;;#!/opt/ASPLv1.00/bin/aspl -verbose WS5 
12.   . ;;#!/opt/ASPLv1.00/bin/aspl WS5 -verbose                     WRONG 
13.   . 
14.   . 
15.   . ;;#!/opt/ASPLv1.00/bin/aspl -wsname WS5 -globalvar
16.   . 
17.   . ;; /opt/ASPLv1.00/ex1.aspl /tmp/aa1 /tmp/aa4
18.   . 
      ;;*********************************************************************** 
19.   . ;;   excurl.aspl
20.   . ;;
21.   . ;;   Using DEF
22.   . ;;   Using Curly Set Expression Demo
23.   . ;;
24.   . ;;   Copyright © 2020-2021 Bassem W. Jamaleddine
25.   . ;;   Copyright © 2021 Total Computing & Network Design, Inc.
26.   . ;;   All rights reserved.
27.   . ;;
28.   . 
      ;;*********************************************************************** 
29.   . 
30.   . attachlog +aspl-date.log
31.   . trace 1
32.   . load WS1
33.   . f& a1 a2 a3
34.   . endscript
35.   . 
36.   . load WS1
37.   . v
38.   . load WS5
39.   . v
40.   . endscript
41.   . 
42.   . ;; /opt/ASPLv1.00/ex1.aspl /tmp/TX/27238-tx.jar /tmp/TX/38141-tx.jar
43.   . 
44.   . ;;d1 = ggjar(jarfile,$1,calchksum,1,calentropy,1)
45.   . ;;d2 = ggjar(jarfile,$2,calchksum,1,calentropy,1)
46.   . ;;d1 = ggdir $1
47.   . ;;d2 = ggdir $2
48.   . 
49.   . sequencing lcs
50.   . f%U d1 d2
51.   . density d1 d2
52.   . sim d1 d2
53.   . endscript
54.   . 
55.   . 
56.   . ;;FN pp()
57.   . ;;FN pp3(a2,a3,a4)
58.   . 
59.   . displayoff
60.   . ;FN pp(); FN pp3(a2,a3,a4);v
61.   . #f& a2 a4;
62.   . 
63.   . def pp := a12 = f& a1 a2; a23 = f& a2 a3; a123 = f& a12 a23
64.   . def pp3 := x12 = f& %%1 %%2; x23 = f& %%2 %%3; x123 = f& x12 x23
65.   . 
66.   . endscript
67.   . 
68.   . ;; d1 = ggdir $SHELL:V1
69.   . ;; d2 = ggdir $SHELL:V2
70.   . ;; f%& d1 d2
71.   . ;; endscript
72.   . 
73.   . ;; aspl script
74.   . ;; script /opt/ASPLv1.00/script.aspl
75.   . 
76.   . load WS1
77.   . v
78.   . load WS5
79.   . v
80.   . 
81.   . endscript
82.   . 
83.   . 

 

● SET EQUALITY and its Amplifiers

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

       a yellow note
Equal  determines if two or more sets are equal 
mostlyEqual  determines if two or more sets are mostly equal 
looselyEqual  determines if two or more sets are loosely equal 
mostlyLooselyEqual  determines if two or more sets are mostly loosely equal 
noeattrEqual  determines if two or more sets (ignoring the attributes) are equal 
mostlyNoeattrEqual  determines if two or more sets (ignoring the attributes) are equal 
looselyNoeattrEqual  determines if two or more sets (ignoring the attributes) are mostly equal 
mostlyLooselyNoeattrEqual  determines if two or more sets (ignoring the attributes) are mostly loosely equal 
(C)2024 ASPL Inc.