3.3 + : Addition operator

Format

$zdd1$ + $zdd2$ $\rightarrow $ $zdd3$

Description

Addition of weights for the same itemsets corresponding to $zdd1$ and $zdd2$.

Example

Example 1: Basic Example

> require 'zdd'
> a=ZDD::itemset("a")
> b=ZDD::itemset("b")
> c=ZDD::itemset("c")
> x=3*a + 2*b
> y=2*a + 2*b + 4*c
> x.show
 3 a + 2 b
> y.show
 2 a + 2 b + 4 c
> (x+y).show
 5 a + 4 b + 4 c

See Also

$-$ : Subtraction operator

$+$ : Plus unary operator