本文整理汇总了C#中System.Collections.ArrayList.Max方法的典型用法代码示例。如果您正苦于以下问题:C# ArrayList.Max方法的具体用法?C# ArrayList.Max怎么用?C# ArrayList.Max使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类System.Collections.ArrayList
的用法示例。
在下文中一共展示了ArrayList.Max方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ExtractUniqueQueryTokens
public static void ExtractUniqueQueryTokens(ArrayList<ArrayList<QueryToken>> disjuncts, ArrayList<ArrayList<QueryToken>> finalQueryList,
double twitterProfilerFrequencyThreshold)
{
//extract all term subsets
ArrayList<ArrayList<QueryToken>> subsetsCombined = new ArrayList<ArrayList<QueryToken>>();
foreach (var disjunct in disjuncts)
subsetsCombined.AddRange(QueryConverterUtils.GetSubsets(disjunct));
//group same subsets and count occurance
var subsetsCombinedGrouped =
from s in subsetsCombined
group s by TwitterProfiler.QueryTokensToStringConverter(s) into gs
select new {subsetKey = gs.Key,
subsetOccurance = gs.Count(),
subset = gs.First()};
ArrayList<int> subsetsGroupedOccurance = new ArrayList<int>();
ArrayList<ArrayList<QueryToken>> subsetsGrouped = new ArrayList<ArrayList<QueryToken>>();
foreach (var item in subsetsCombinedGrouped)
{
subsetsGroupedOccurance.Add(item.subsetOccurance);
subsetsGrouped.Add(item.subset);
}
int maxOccurance = subsetsGroupedOccurance.Max();
// select subsets with max occurance and extract
QueryConverterUtils.ExtractUniqueQueryTokensBasedOnOccurance(disjuncts, finalQueryList, twitterProfilerFrequencyThreshold, subsetsGrouped, subsetsGroupedOccurance, maxOccurance);
}