private static int [ ] freq ( int [ ] [ ] itemsets ) { int [ ] f = new int [ Math . max ( itemsets ) + 1 ] ; for ( int [ ] itemset : itemsets ) { for ( int i : itemset ) { f [ i ] ++ ; } } return f ; }
Returns the frequency of single items .