private FPTree getLocalFPTree ( FPTree . Node node , int [ ] localItemSupport , int [ ] prefixItemset ) { FPTree tree = new FPTree ( localItemSupport , minSupport ) ; while ( node != null ) { Node parent = node . parent ; int i = prefixItemset . length ; while ( parent != null ) { if ( localItemSupport [ parent . id ] >= minSupport ) { prefixItemset [ -- i ] = parent . id ; } parent = parent . parent ; } if ( i < prefixItemset . length ) { tree . add ( i , prefixItemset . length , prefixItemset , node . count ) ; } node = node . next ; } return tree ; }
Generates a local FP tree