Exemplo n.º 1
0
 public void Shrink(int freq)
 {
     int i = 0;
     while (i < featureset_dict_.Count)
     {
         if (featureset_dict_.ValueList[i].Value < freq)
         {
             //If the feature's frequency is less than specific frequency, drop the feature.
             featureset_dict_.RemoveAt(i);
         }
         else
         {
             i++;
         }
     }
 }
Exemplo n.º 2
0
        static void Main(string[] args)
        {
            //Test BTreeDictionary for very large data set
            BTreeDictionary<long, long> sdict = new BTreeDictionary<long, long>();

            for (long i = 10000; i >= 0; i-=2)
            {
                sdict.Add(i, i);
            }

            long val = sdict.KeyList[123];
            long n = sdict.ValueList[123];
            sdict.RemoveAt(123);
            long cnt = sdict.ValueList.Count;


            Console.WriteLine("Done.");
            Console.ReadLine();
        }
Exemplo n.º 3
0
        static void Main(string[] args)
        {
            //Test BTreeDictionary for very large data set
            BTreeDictionary <long, long> sdict = new BTreeDictionary <long, long>();

            for (long i = 10000; i >= 0; i -= 2)
            {
                sdict.Add(i, i);
            }

            long val = sdict.KeyList[123];
            long n   = sdict.ValueList[123];

            sdict.RemoveAt(123);
            long cnt = sdict.ValueList.Count;


            Console.WriteLine("Done.");
            Console.ReadLine();
        }