entt icon indicating copy to clipboard operation
entt copied to clipboard

Do you have any plan to make dense_multimap container ?

Open gamephysics opened this issue 3 years ago • 2 comments

Hello!

entt has only dense_map, dense_set.

Do you have any plan to make dense_multimap container ?

gamephysics avatar Jul 18 '22 09:07 gamephysics

I don't but it might be an option actually. Should be easy to adapt the dense map. Do you want to give it a try?

skypjack avatar Jul 19 '22 09:07 skypjack

I am trying to make hash grid map for collision, so I need to use dense multi-map for the performance.

gamephysics avatar Jul 26 '22 05:07 gamephysics

Should be easy to adapt the dense map.

I tried to implement this and it basically turned out that the underlying data structure (technically, a glorified sparse set) isn't a good fit to support multiple elements in a bucket based dense map. This is true unless one is willing to make a lot of compromises in terms of performance and functionalities. This would make it a niche implementation in turn and I don't want to maintain something that is pretty much useless. Therefore, the answer is no. A corresponding dense multi-map will not be implemented. I'm sorry.

I'll close the issue soon if there are no comments, contribution proposals or suggestions on alternative approaches.

skypjack avatar Aug 09 '22 15:08 skypjack

@gamephysics take a look at https://github.com/greg7mdp/gtl 's btree_multimap if that fits your needs.

exuvo avatar Sep 03 '22 16:09 exuvo