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

Fix MultiArray and DoubleGrid data set to use row major storage as documented #329

Merged
merged 5 commits into from
Dec 16, 2020

Conversation

wirew0rm
Copy link
Member

The MultiArray container was documented to use row-major storage to be compatible with c++ and other existing code, but implemented as column major.

This PR fixes this discrepancy by using row-major.

Also DoubleGridData set had to be adapted, because the expectation here that colums correspond to the x-axis and rows to the y-axis, so the data has to be transposed here.

If they do not use the internal MultiArray type, nothing should change for end users, there are not modifications to the samples.

RalphSteinhagen and others added 4 commits December 15, 2020 16:16
N.B. while MultiArray is row-major (ie. [rowIndex,colIndex]) plotting is de-factor column-major order (ie. abscissa==column, ordinate==row) order, and thus the dimensions/shape need to be transposed w.r.t. each other.
@codecov
Copy link

codecov bot commented Dec 16, 2020

Codecov Report

Merging #329 (b088c48) into master (c0ea477) will increase coverage by 0.01%.
The diff coverage is 100.00%.

Impacted file tree graph

@@             Coverage Diff              @@
##             master     #329      +/-   ##
============================================
+ Coverage     51.84%   51.85%   +0.01%     
- Complexity     7315     7318       +3     
============================================
  Files           394      394              
  Lines         41189    41197       +8     
  Branches       6627     6627              
============================================
+ Hits          21353    21364      +11     
+ Misses        18333    18332       -1     
+ Partials       1503     1501       -2     
Impacted Files Coverage Δ Complexity Δ
...ain/java/de/gsi/dataset/spi/DoubleGridDataSet.java 97.41% <100.00%> (+0.19%) 50.00 <8.00> (+2.00)
...main/java/de/gsi/dataset/spi/utils/MultiArray.java 74.66% <100.00%> (+2.66%) 27.00 <0.00> (ø)
...art/renderer/datareduction/DefaultDataReducer.java 63.60% <0.00%> (+0.35%) 23.00% <0.00%> (+1.00%)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update c0ea477...b088c48. Read the comment docs.

@wirew0rm wirew0rm merged commit 582a499 into master Dec 16, 2020
@wirew0rm wirew0rm deleted the fixMultiArray2D branch December 16, 2020 13:40
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.

None yet

3 participants