.restrict()
For itemsets included in , select the term as long as contains at least one itemset.
More precisely, is the set of items that make up where the weight of term is removed, assuming that represents the same itemsets in , if at least one satisfy , select term that corresponds to from .
In relation, the conditional function is changed to to become permit function.
> require 'zdd' > a=ZDD::itemset("a") > b=ZDD::itemset("b") > c=ZDD::itemset("c") > x=5*a + b*c + 3*b + 2 > x.show 5 a + b c + 3 b + 2 # Among 4 itemsets a,bc,b,Φ (empty itemset has a weight of 2) in x, # 2 itemsets a,b in y included in any of the itemset are a,bc. # Therefore terms a,bc are selected from x. > x.restrict(a+c).show 5 a + b c # Among 4 itemsets a,bc,b,Φ in x, # itemset z only includes itemset bc. # Therefore term bc is selected from x. > x.restrict(b*c).show b c # Among 4 itemsets a,bc,b,Φ in x, # all itemsets containing itemset Φ (empty itemsets with weight of 1) is in a set of items. > x.restrict(1).show 5 a + b c + 3 b + 2 # Among 4 itemsets a,bc,b,Φ in x, there is no itemset contained in itemset abc. > x.restrict(a*b*c).show 0
permit : Selection of subset