Skip to content

dm-8216 Histogram for long values #224

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

Merged
merged 1 commit into from
Nov 11, 2016
Merged

dm-8216 Histogram for long values #224

merged 1 commit into from
Nov 11, 2016

Conversation

tgoldina
Copy link
Contributor

@tgoldina tgoldina commented Nov 9, 2016

  • pass 14 sig digits, when creating histogram
  • collapse bins if overlapping bins are passed to the client because of precision loss
  • use column chart if all bins are of 0 width
  • cleanup most warnings in HistogramProcessor.java
  • use long to store number of points in a bin

To test, use firefly_test_data/DAXTestData/RunDeepForcedSource_limit100.csv
The following columns are long: id, coordHtmId20, objectId, exposureId.
(The display should be fine – compared to dev version – even though the precision can be reduced with respect to the original.)

The inherent limitation is that Javascript numbers are 64-bit float point, so the 63 bits in Long are converted to 52 bits of Double, hence the precision is inevitably lost if a number is long enough. Even if we find a way to handle arbitrary precision numbers in Javascript, they are not currently supported by Highcharts charting library.

for (int i = 1; i < nBin; i++) {
binMin[i] = bins[i - 1];
}
System.arraycopy(bins, 0, binMin, 1, nBin-1);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! Learned a good way to do array copy.

@lznakano
Copy link
Contributor

It looks good to me. It showed long values. Nice work, especially the modification to the java code.
Thanks!

@tgoldina tgoldina merged commit 73e7083 into dev Nov 11, 2016
@tgoldina tgoldina deleted the dm-8216_histlong branch November 15, 2016 19:02
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

Successfully merging this pull request may close these issues.

2 participants