GNU Scientific Library - Bugs: bug #43868, gsl_permutation_mul is described...
You are not allowed to post comments on this tracker with your current authentication level.
bug #43868: gsl_permutation_mul is described backwards
Submitter: | David E. Narvaez <dmaggot> | ||
Submitted: | Mon 22 Dec 2014 12:37:44 PM UTC | ||
Category: | Documentation | Severity: | 3 - Normal |
Operating System: | Status: | Wont Fix | |
Assigned to: | None | Open/Closed: | Closed |
Release: | 1.15 |
Mon 29 Jun 2015 02:04:42 PM UTC, comment #1: |
Patrick Alken <psa> |
Mon 22 Dec 2014 12:37:44 PM UTC, original submission:
The documentation says it calculates p = pa pb, which is applying pb first, then pa; but the code does pb->data[pa->data[i]] which is p = pb pa. |
David E. Narvaez <dmaggot> |
Attached Files
Depends on the following items: None found
Items that depend on this one: None found
Carbon-Copy List
Follow 3 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2015-06-29 | psa | Status | None | Wont Fix | |
Open/Closed | Open | Closed | |||
2015-06-29 | psa | Attached File | - | Added perm.c, #34342 |
Powered by Savane 3.13-3230.
Corresponding source code
The code and documentation are actually correct. Note that the permutation acts by exchanging columns instead of rows, so the nested index does the right thing. The attached code (perm.c) checks this on two simple permuations:
Pa = [0,1,3,2]
Pb = [1,3,2,0]
and makes sure gsl_permutation_mul gives the expected results. A quick check by hand shows that it does.
(file #34342)