feat: Add method to convert global ids to local ids for PlacementSet#40
feat: Add method to convert global ids to local ids for PlacementSet#40
Conversation
|
Can you add some tests so that I can debug how your algorithm works? It still looks way too complicated with way too many array lookups like For every element in That should not take 10+ array operations to achieve, so I'd like to double check what's going on in your array operations :) |
|
I try to refactor to follow your logic, still i haven't found a way to filter ids for local chunks, to prevent to convert ids not related to that chunk and also to compute the local chunks offset, without using lookups. Anyway i am using isin only for chunk id lists, so should be an order of thousands of elements, i think it should be fast. |
|
@Helveg, Filippo implemented your feedback. Could you please review this PR, we would like to bump the main bsb package. |
Since the need to deal with global ids for targetting classes i add a method to convert ids called: convert_to_local.
it is linked to the PR in bsb-core: dbbs-lab/bsb-core#898