.same?(
)
===
Compare 2 ZDD objects and
, returns true if the operands are the same, and false if they are different.
Two "=" operator (== operator) has a different definition, it is used to carry out equal to comparison of the terms within the expression, thus, take note that this operator is completely different.
> require 'zdd' > require 'zdd' > a=ZDD::itemset("a") > b=ZDD::itemset("b") > c=ZDD::itemset("c") > puts a.same?(b) false > puts a.same?(a) true > puts (a+b).same?(a+c) false > puts (a+b).same?(a+b) true > puts (a-a).same?(0) true > puts (2*a/a)===2 true
diff? : Not equal to comparison operator