tzaeschke / phtree-cpp

PH-Tree C++ implementation
Apache License 2.0
29 stars 9 forks source link

Wishlist - various plans & ideas - what do users want? #125

Open tzaeschke opened 1 year ago

tzaeschke commented 1 year ago

At anyone reading this: please feel free to put suggestions & endorsements into comments below

Here are some assorted ideas / plans for the future:

API:

Internally:

Documentation:

iegorval commented 8 months ago

Hello. If you are accepting proposals, I would vote for more examples and documentation. I fail completely to understand how multi-map works, for example. If there is some way to have maximum allowed number of values for specific keys and so on.

tzaeschke commented 8 months ago

@iegorval Thanks. Indeed, the example.cc is quite outdated and doesn't cover mutli-map. Unfortunately, I am quite busy at the moment, so I am not sure when I get around to do that.

Maybe

For example, the default version of PhMultiMapD<DIM, T> uses internally something similar to a std::set<T> to store multiple entries per coordinate. This default version does not have a maximum number of entries per coordinate. I see two ways for limiting the number of entries:

1) Before inserting an entry, you can call find(key) or count(key) to find out how many elements are already at a given coordinate. 2) You can use your own implementation of set that has an upper limit for the number of entries and use this with PhTreeMultiMap, see here how the default is declared. 3) You can use a normal PhTree<DIM, std::vector> and manage the maximum entry count yourself.

If you have more questions, maybe you can open a separate issue or you can ask questions on Discord. I hope that helps?