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++; } } }
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(); }
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(); }