ASPL Guide to Operations v 1.00
© 2024 by SetSphere.COM


3. 9
   #a gets the cardinality of a binned set variable

 

logo

#a [a1 .. aN]       where [a1 .. aN] are set variables

#a

When specified by itself then display the cardinality of the dataset on the top of the augmented stack

cardinality  text  01*  notcommu        ins:H_H_AH  ret:text

●  Operator #a gets the cardinality of a binned set variable

Use the operator #a to display the cardinality of an augmented set variable (also called binned set variable). When followed by multiple binned set variables then show the cardinality of all binned set variables. To show the cardinality of the dataset resulting from the last augmented operation, just issue #a and that will show the cardinality of the last operation pushed on the top of the augmented enswer stack.
See also the adensity operator see SECTION 3.19.1 [adensity determines the elements density of one or more binned set variables] .

 

#a EXAMPLE
In this example we start ASPL loading the sample workspace WS1 then we issue the operator #a to show how to get the cardinality of groups respresented by binned set variables.

 

#a OPERATION

aspl WS1
    (start ASPL loading the sample workspace WS1)

①  aspl> av
    (print the augmented symbol table to show the binned set variables)

②  aspl> #a aa1
    (display the cardinality of binned set variable aa1)

③  aspl> #a aa1 aa2 aa3
    (display the cardinality of aa1 aa2 aa3)

④  aspl> uu123 = fUU aa1 aa2 aa3
    (get the elements union of aa1 aa2 aa3 and assign it to uu123)

⑤  aspl> av
    (print the augmented symbol table to show the binned set variables)

⑥  aspl> #a uu123
    (display the cardinality of binned set variable uu123)

⑦  aspl> ens
    (display the answer stack)

⑧  aspl> #a
    (display the cardinality of the dataset on the top of stack)

⑨  aspl> UU123 = gUU aa1 aa2 aa3
    (get the group union of aa1 aa2 aa3 and assign it to binned set variable UU123)

⑩  aspl> # uu123 UU123
    (display the cardinality of uu123 and UU123)

⑪  aspl> adensity uu123
    (display the adensity of uu123)

⑫  aspl> asim uu123
    (display the asimilarity of binned set variable uu123)