Open ricejasonf opened 7 years ago
This would be super useful for turning an edge list...
hana::tuple<
hana::pair<A, B>,
hana::pair<A, C>,
hana::pair<A, D>,
hana::pair<B, C>,
hana::pair<B, D>>
...into an adjacency list for a compile-time graph:
hana::tuple<
hana::pair<A, hana::tuple<B, C, D>>,
hana::pair<B, hana::tuple<C, D>>>
(assuming I understand the intent of @ricejasonf's post)
This is just a thought, but we should consider making a sparse array similar to
hana::detail::hash_table
for the purpose of making a fast "group by" algorithm. One problem would be that it would have to usefold_left
to construct the lookup which I recall was an expensive up front cost.The result could even be a
hana::map
as it appears that everything exceptmake_map
is agnostic to the use ofhana::hash
.I kind of got a start on something. The following is ripped from
hana::detail::hash
:See the following for background information: http://stackoverflow.com/questions/42541148/how-do-i-speed-up-many-different-hanafilters-on-the-same-input-data