matsui528/rii

Merge two instances

matsui528 opened this issue · 0 comments

Merge two instances (with the same fine_quantizer). e.g.:

e0 = rii.Rii(codec)
e1 = copy.deepcopy(e0)

e0.add_configure(X1)
e1.add_configure(X2)

e0.merge(e1)  # contain both X1 and X2

With this, one can add data to each instance in parallel on different computers, and merge them in the final instance.

Question: How to handle posting lists and coarse centers? One answer is to use the first one (e0.coarse_centers), and forget about e1 completely (in this case, it will be recommended to run e0.reconfigure again after the merge)