dan1994 / dane

Training exercise in Huffman coding
0 stars 0 forks source link

Add countT and countU functions to BiMap #32

Closed dan1994 closed 5 years ago

dan1994 commented 5 years ago

This should just call std::unordered_map::find on the relevant member. It would be of value when implementing the decode method of HuffmanEncoderDecoder to do searches w/o using atT and atU which throw exceptions if the specific key is not in the container.

dan1994 commented 5 years ago

find methods return an iterator which means that I will have to start adding begin and end methods which I don't really need. So instead of find I'll implement count methods that return int and do not require iterator comparison.