make_projdb_from_org_dataset( dSupport, pnFreqCount ) { foreach sequence { count number of sequences in nCount foreach itemset { foreach item { count nPatLen and nSeqLen # Count each item once for this sequence if(counter[item]->s_id < cur seq #) { counter[ item ]->count += 1 for this sequence counter[item]->s_id = cur seq # if this is NOT the last item in a sequence { # Keep count of inter-items inter_freq_count[item]++ } } } } Keep track of the longest itemset (max_pat_len) keep track of the longest sequence, including -1's (nMaxSeqLen) }