2.6 Combination with control statement

The series of partial itemset enumeration shown in section 2.2 and 2.3 can be combined with the control statement. The examples are described below.

In the example below, the item is not declared by the symbol function, but the itemset is directly defined by the itemset function. Using the multiplication operator *= on Ruby variable t, subsequent computation results is accumulated one after the other.

> t=ZDD::constant(1)
> ["a","b","c","d"].each{|item|
>  t*=(ZDD::itemset(item)+1)
> }
 a b c d + a b c + a b d + a b + a c d + a c + a d + a + b c d + b c +
  b d + b + c d + c + d + 1