3.38 minweight : Value of minimum weight

Format

$obj$.minweight $\rightarrow $ $zdd$

Description

Among all terms (including constant) contained in $obj$, return the minimum weight of ZDD constant object to $zdd$.

Example

Example 1: Basic Example

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

# The maximum constant term is returned. 
> x=5*a-3*b+c-10
> x.show
 5 a - 3 b + c - 10
> x.minweight.show
 - 10

# Select the term with the maximum weight.
> x=5*a-3*b+5*c-3
> x.show
 5 a - 3 b + 5 c - 3
> x.termsEQ(x.minweight).show
 - 3 b - 3

See Also

maxweight : Value of maximum weight

totalweight : Sum of weight