3.55 to_i : Convert ZDD constant object to Ruby integer

Format

$obj$.to_i() $\rightarrow $ $constant$

  $constant$ : integer

Description

Convert ZDD constant object $obj$ (weight of empty itemset) to Ruby integer $constant$. Return nil if the weight object is not a ZDD object.

Example

Example 1: Basic Example

> require 'zdd'
> c=ZDD::constant(10)
> c.show           # ZDD constant object
 10
> puts c.to_i      # ruby integer
10

# Return nil if not ZDD constant object. 
> a=ZDD::itemset("a")
> p a.to_i
nil

See Also

constant : Create ZDD constant object

to_a : Convert to itemset array