Boost logo

Boost :

From: Debabrata Mandal (mandaldebabrata123_at_[hidden])
Date: 2020-06-09 14:28:09

I want to make some additions to the previous post.
1. I believe unordered_map should be used instead of vector/array, since
apart from the many problems of using a vector/array we cannot give an O(1)
guarantee on every access (due to resizing) which was the primary reason we
wanted to use it.
2. We should provide the support for multi dimensional storage (upto 3
dims) for this class, since anyways if we decide to make a Matrix class for
GIL (in the future), this histogram class would become redundant.

Some doubts that I had posted on the slack group as well :

I was wondering if we should go for aggregation instead of inheritance as
mentioned in the mail
The primary reason being I also want to add a bunch of histogram algorithms
like mean, normalize, etc. Also I wanted to provide an overloaded
operator() for multi-dimensional element access.
The plus point in inheriting is that we get control over the hash function
used, but then we could also use an alternative method of creating our
method of hashing a tuple to a unique key and then use hashed key (which we
can do in aggregation).

Please correct me if I am wrong.

Boost list run by Boost-Gil-Owners