예제 #1
0
        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++;
                }
            }
        }
예제 #2
0
        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++;
                }
            }
        }
예제 #3
0
 internal void clone(ItemSet newItemSet)
 {
     foreach (Item item in items)
     {
         newItemSet.add(item);
     }
     newItemSet.support = this.support;
 }
예제 #4
0
 internal void clone(ItemSet newItemSet)
 {
     foreach (Item item in items)
     {
         newItemSet.add(item);
     }
     newItemSet.support = this.support;
 }