3.5 - : Subtraction operator

Format

$zdd1 - zdd2 \rightarrow zdd$

Description

Subtraction 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
 a - 4 c
> (y-x).show
 - a + 4 c

See Also

$+$ : Addition operator

$-$ : Unary negative operator