コード例 #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++;
         }
     }
 }
コード例 #2
0
ファイル: Program.cs プロジェクト: zhongkaifu/AdvUtils
        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();
        }
コード例 #3
0
ファイル: Program.cs プロジェクト: yunqing-xia/AdvUtils
        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();
        }