static void addTransactions() { // int lineNum = 0; string line; using (StreamReader sr = new StreamReader("data/topic-1.txt")) { while ((line = sr.ReadLine()) != null) { List<string> data = line.Split(' ').ToList(); ItemSet set = new ItemSet(); foreach (string d in data) { if (!d.Equals("")) { Item it = new Item(d); set.add(it); } } set.sort(); transactions.Add(set); // lineNum++; } } }
static void addTransactions() { // int lineNum = 0; string line; using (StreamReader sr = new StreamReader("data/topic-1.txt")) { while ((line = sr.ReadLine()) != null) { List <string> data = line.Split(' ').ToList(); ItemSet set = new ItemSet(); foreach (string d in data) { if (!d.Equals("")) { Item it = new Item(d); set.add(it); } } set.sort(); transactions.Add(set); // lineNum++; } } }
internal void clone(ItemSet newItemSet) { foreach (Item item in items) { newItemSet.add(item); } newItemSet.support = this.support; }