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


3. 18
   density determines the elements density of one or more set variables

 

logo

density a1 [a2 .. aN]       where a1 [a2 .. aN] are set variables

density

When specified by itself then the operation is performed on the object on top of the stack

density  text  1*          ins:H_H_H  ret:text

●  Operator density determines the elements density of one or more set variables

Use the density operator to display the density of a set variable.

 

density EXAMPLE1

The following example shows how to display the density of one or many set variables.

 

density OPERATION1

aspl WS1
    (start ASPL loading the sample workspace WS1)

①  aspl> a123 = gU a1 a2 a3
    (a123 is assigned the union of a1 a2 a3)

②  aspl> v

③  aspl> density a123

④  aspl> density a1 a2 a3

print out a12

 

density EXAMPLE2

The following example shows how to display the density of one or many set variables in the RANDONEBITMIX.

 

density OPERATION2

aspl RANDONEBITMIX
    (start ASPL loading the sample workspace RANDONEBITMIX)

①  aspl> v

②  aspl> density g1
    (display the density of mg1)

③  aspl> density g1 g2
    (display the density of g1 g2)

④  aspl> density mg12
    (display the density of mg12)

 

density EXAMPLE3

The following example shows how to display the density, the descriptor, and the cardinality of a set variable in the RANDONEBITMIX.

 

density OPERATION3

aspl RANDONEBITMIX
    (start ASPL loading the sample workspace RANDONEBITMIX)

①  aspl> v
    (display the symbol table)

②  aspl> density mg12
    (display the density of mg12)

③  aspl> v d mg12
    (display the descriptor of mg12)

④  aspl> # mg12
    (display the cardinality of mg12)