Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge implementation of MergingDigest #200

Closed
rnataf opened this issue Sep 14, 2022 · 2 comments
Closed

Merge implementation of MergingDigest #200

rnataf opened this issue Sep 14, 2022 · 2 comments

Comments

@rnataf
Copy link

rnataf commented Sep 14, 2022

Hi, I have a question about the implementation of the merge function of MergingDigest: private void merge(double[] incomingMean, double[] incomingWeight, int incomingCount, List<List<Double>> incomingData, int[] incomingOrder, double unmergedWeight, boolean runBackwards, double compression). In the loop for (int i = 1; i < incomingCount; i++) , what prevents the variable lastUsedCell not to increase too much, leading to an illegal access to the array weight[lastUsedCell] ?

I'm asking because I did a small modification to the code (multiplying weights by a constant before continuing adding data, to the object) and it caused lastUsedCell to have a bigger value than weight.length.

@rnataf rnataf changed the title Question regarding the implemetation Merge implementation of MergingDigest Sep 14, 2022
@tdunning
Copy link
Owner

tdunning commented Sep 14, 2022 via email

@rnataf
Copy link
Author

rnataf commented Sep 14, 2022

Okay, thank you for your answer.

@rnataf rnataf closed this as completed Sep 14, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants