U
U
uvelichitel2018-08-09 11:05:26
Algorithms
uvelichitel, 2018-08-09 11:05:26

Data structure for Euler circles?

There are entities united in sets by tags. One entity can be marked with several tags. Suggest a data structure that allows making requests Tag1+Teg2-Teg3 in constant time (possibly with structure balancing out_of_process).
If such a structure is possible, then its approximate memory_layout (on paper, Euler circles look attractive, but how to fit them into a one-dimensional sequential memory / file)
Load profile - 1000 elements, 100 tags, read more often than write.
For key-value store for example:

  • data structure - dictionary/associative_array
  • memory layout - sparse_array

what about tags-values?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
L
longclaps, 2018-08-09
@longclaps

bit fields

V
Vladimir Olohtonov, 2018-08-13
@sgjurano

The classic approach to solving this problem is a boolean index:
map[tag]set[id]

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question