hash-function Questions
8
Solved
I'm currently implementing a hash table in C++ and I'm trying to make a hash function for floats...
I was going to treat floats as integers by padding the decimal numbers, but then I realized that...
Unsuspecting asked 21/11, 2010 at 13:40
15
Solved
As per my understanding I think:
It is perfectly legal for two objects to have the same hashcode.
If two objects are equal (using the equals() method) then they have the same hashcode.
If two obj...
Lues asked 27/6, 2011 at 13:31
9
Solved
What is the maximum length of the string that can have md5 hashed? Or: If it has no limit, and if so what will be the max length of the md5 output value?
Dropout asked 3/8, 2010 at 7:43
5
How can I store objects of a class in an unordered_set? My program needs to frequently check if an object exists in this unordered_set and if it does, then do some update on that object.
I have lo...
Lashondalashonde asked 24/7, 2016 at 16:11
1
I am trying to apply a hash function to short strings in a column of a PySpark DataFrame (running on an EMR cluster) and get a numeric value as a new column. CRC3 would do the job for example. I am...
Lease asked 16/10, 2019 at 15:43
8
Solved
I have check out this Wikipedia page on it, but I still don't understand it. Can someone please help my dim-witted mind to understand the concepts of hashing, hashtable/hashmap, and hash functions?...
Anorthic asked 18/6, 2010 at 12:53
3
Solved
I'm reading a Rust book about HashMap hashing functions, and I can't understand these two sentences.
By default, HashMap uses a cryptographically secure hashing function that can provide resista...
Clyster asked 5/9, 2018 at 11:44
4
I am storing message sequences in the database each sequence can have up to N number of messages. I want to create a hash function which will represent the message sequence and enable to check fast...
Secundine asked 20/8, 2018 at 22:2
1
Solved
I recently happened to think about object property access times in JavaScript and came across this question which seemed to reasonably suggest that it should be constant time. This also made me won...
Spadefish asked 26/5, 2018 at 9:19
4
Solved
The Question
What is a good specialization of std::hash for use in the third template parameter of std::unordered_map or std::unordered_set for a user defined type for which all member data types ...
Hypsometer asked 23/6, 2014 at 8:53
4
Solved
Looking at the book Mining of Massive Datasets, section 1.3.2 has an overview of Hash Functions. Without a computer science background, this is quite new to me; Ruby was my first language, where a ...
Darwen asked 3/5, 2017 at 14:28
2
I have a problem implementing minhashing. On paper and from reading I understand the concept, but my problem is the permutation "trick". Instead of permuting the matrix of sets and values the sugge...
Combinative asked 24/9, 2013 at 8:50
5
Solved
I need to use a hash function which belongs to a family of k-wise independent hash functions. Any pointers on any library or toolkit in C, C++ or python which can generate a set of k-wise independe...
Staffan asked 29/4, 2013 at 17:5
2
Solved
My question is connected with task from CS50, pset5. For ones who don't know any about that, I'll try to explain. Nothing very special. I just need to make function which will intake dictionary fil...
Apparitor asked 14/7, 2016 at 5:43
2
Solved
I am required to use multiple hashtables, so in c++, I would normally use an std::unordered_map. So far I can understand that I can use a dictionary in Python, so let's assume the following code:
...
Sande asked 8/5, 2016 at 13:31
1
Solved
Why does Git use SHA-1, a cryptographic hash function, instead of a faster non-cryptographic hash function?
Related question:
Stack Overflow question Why does Git use SHA-1 as version number...
Deception asked 1/3, 2015 at 11:1
5
Solved
I am trying to implement SHA-2 encryption instead of SHA-1.
For this, I know that the number of bits between these two hash algorithms are different, and it confuses me.
How can this be achieved...
Psalter asked 13/5, 2010 at 13:28
1
Solved
I am having trouble adapting the pending C++1z proposal N3980 by @HowardHinnant to work with tabulation hashing.
Ab initio computing a tabulation hash works the same as for the hashing algorithm ...
Cloris asked 17/12, 2014 at 13:53
1
To generate a hash function, Map a key k into one of m slots by taking the remainder of k divided by m. That is, the hash function is
h(k) = k mod m.
I have read at several places that a good cho...
Thermopylae asked 4/12, 2014 at 7:28
3
I am writing a hash function for my object. I already can hash containers, and combine hashes, thanks to Generic Hash function for all STL-containers. But my classes also have enums. Of course I ca...
Felker asked 10/3, 2012 at 12:8
3
Solved
I need to define an unordered_map like this unordered_map<pair<int, int>, *Foo>, what is the syntax for defining and passing a hash and equal functions to this map?
I've tried passing ...
Diderot asked 28/8, 2011 at 16:22
4
Solved
Description of problem:
I'm in the process of working with a highly sensitive data-set that contains the people's phone number information as one of the columns. I need to apply (encryption/hash f...
Flasher asked 8/4, 2013 at 20:28
2
I'm trying to implement a Count-Min Sketch algorithm in Scala, and so I need to generate k pairwise independent hash functions.
This is a lower-level than anything I've ever programmed before, and...
Mindamindanao asked 25/8, 2012 at 8:11
3
Solved
I have a Boolean string (like "01100..001") of length 128 characters (means 128 number of 0/1). I am searching for an efficient (fast) hash function in Java, which produce a much lower representati...
Sphygmo asked 22/4, 2012 at 17:12
2
Solved
I just found myself a little bit surprised being unable to simply use a
std::unordered_set<std::array<int, 16> > test;
because there does not seem to be a std::hash specialization fo...
Brawn asked 6/11, 2011 at 13:41
1 Next >
© 2022 - 2024 — McMap. All rights reserved.