[Cs3] Hashmap with Hash of specific number of buckets

Mikhail Nesterenko mikhail at cs.kent.edu
Thu Oct 12 23:23:04 EDT 2017



> 
> I am trying to create a hashmap where the default hash uses a specific
> number of buckets but cannot get anything to compile. Do you have any
> suggestions?
> 
> This is constructor I am trying to envoke
>  DefaultHash(size_t numBuckets = defaultNumBuckets);
> 
> I have tried...
> 
> hashmap<int,int> myHashMap(std::equal_to<int>, DefaultHash<int>(11);
> 
> ---
> 
> DefaultHash<int> elevenHash = DefaultHash<int>(11);
> hashmap<int, int, std::equal_to<int>, elevenHash> hashMapToRehash;
> 
> and many others, what am I missing?

   hashmap<int, int> myHash(std::equal_to<int>(), 11);


Thanks,
-- 
Mikhail


More information about the cs3 mailing list