Skip to content

Determinant fix #14

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 3 commits into from
Apr 11, 2019
Merged

Determinant fix #14

merged 3 commits into from
Apr 11, 2019

Conversation

caller
Copy link

@caller caller commented Apr 10, 2019

…except me found and fixed this....

fixes this one:
NASAWorldWind#155

@wcmatthysen
Copy link
Member

wcmatthysen commented Apr 10, 2019

Jip. We should probably get that in. I suggest we get a unit-test added for this as well. A simple test that the original issue (NASAWorldWind#155) mentions is to test whether the determinant of a square Matrix is equal to the determinant of its transpose. We can probably add a test that looks something like this:

Matrix matrix = new Matrix( 1, 0, 0, 1,
                            1, 1, 0, 0,
                            0, 0, 1, 0,
                            0, 0, 0, 1);
double determinant = matrix.getDeterminant();
Matrix transpose = matrix.getTranspose();
assertEquals(determinant, transpose.getDeterminant(), tolerance);

@wcmatthysen wcmatthysen added the bug Something isn't working label Apr 10, 2019
@wcmatthysen wcmatthysen added this to the WWJ-CE 2.2.0 milestone Apr 10, 2019
@wcmatthysen wcmatthysen changed the title WTF: determinant math computation was broken for a decade and no one … Determinant fix Apr 10, 2019
Added a unit-test that checks if the determinant of a Matrix is equal to
the determinant of its transpose. This test will break without the
determinant-fix.
@wcmatthysen
Copy link
Member

wcmatthysen commented Apr 10, 2019

We should probably check if this bug is not present in the other versions of WorldWind as well, most notably worldwindjs.

@wcmatthysen wcmatthysen requested a review from emxsys April 10, 2019 22:22
Changed the determinant test to check that the condition hold for any
random matrix (and not jus the sample matrix used initially).
@caller caller merged commit 1bb996e into develop Apr 11, 2019
@wcmatthysen wcmatthysen deleted the determinantFix branch April 11, 2019 18:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants