public GroupByDictionary(ColumnDetails[] keyColumns, int initialCapacity = -1) { _keyColumns = keyColumns; // Create a strongly typed column for each key _keys = new IDictionaryColumn[keyColumns.Length]; for (int i = 0; i < keyColumns.Length; ++i) { _keys[i] = (IDictionaryColumn)Allocator.ConstructGenericOf(typeof(DictionaryColumn <>), keyColumns[i].Type); } // Allocate the arrays for the keys and values themselves Reset(HashCore.SizeForCapacity(initialCapacity)); }
public ChooseDictionary(ChooseDirection direction, ColumnDetails rankColumn, ColumnDetails[] keyColumns, int initialCapacity = -1) { _chooseDirection = direction; _keyColumns = keyColumns; _rankColumn = rankColumn; // Create a strongly typed column for each key _keys = new IDictionaryColumn[keyColumns.Length]; for (int i = 0; i < keyColumns.Length; ++i) { _keys[i] = (IDictionaryColumn)Allocator.ConstructGenericOf(typeof(DictionaryColumn <>), keyColumns[i].Type); } // Create a strongly typed column to hold rank values _ranks = (IDictionaryColumn)Allocator.ConstructGenericOf(typeof(DictionaryColumn <>), rankColumn.Type); _bestRowIndices = (IDictionaryColumn)Allocator.ConstructGenericOf(typeof(DictionaryColumn <>), typeof(int)); // Allocate the arrays for the keys and values themselves Reset(HashCore.SizeForCapacity(initialCapacity)); }
public Dictionary5(IEqualityComparer <T> comparer, int initialCapacity = -1) { _comparer = comparer; Reset(HashCore.SizeForCapacity(initialCapacity)); }