You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If one thinks of a permutation matrix as a full matrix of 1's and 0's, then this statement is not correct. What it does is swap the rows of the permuted matrix when the permutation matrix is applied from the left. This actually corresponds to swapping the columns in the matrix representation of the permutation matrix, and so can be interpreted to mean the exact opposite of what it does.
At the very least, the documentation should be updated to make it clear exactly what the function does. However, the name swap_rows() itself can very easily be misinterpreted, as it does not work quite the same way as e.g. BaseMatrix::swap_rows(). Therefore I propose the following:
Remove swap_rows altogether in favor of simply swap, whose name is somewhat intentionally ambiguous. This way users are more inclined to look up in the documentation what it actually does. It is of course paramount that the documentation is very clear on this point. Since I believe PermutationMatrix has not yet made it into any release yet, I think this can be safely done without worrying about backwards compatibility.
Thoughts?
The text was updated successfully, but these errors were encountered:
The docs for
swap_rows()
currently say:If one thinks of a permutation matrix as a full matrix of 1's and 0's, then this statement is not correct. What it does is swap the rows of the permuted matrix when the permutation matrix is applied from the left. This actually corresponds to swapping the columns in the matrix representation of the permutation matrix, and so can be interpreted to mean the exact opposite of what it does.
At the very least, the documentation should be updated to make it clear exactly what the function does. However, the name
swap_rows()
itself can very easily be misinterpreted, as it does not work quite the same way as e.g.BaseMatrix::swap_rows()
. Therefore I propose the following:Remove
swap_rows
altogether in favor of simplyswap
, whose name is somewhat intentionally ambiguous. This way users are more inclined to look up in the documentation what it actually does. It is of course paramount that the documentation is very clear on this point. Since I believePermutationMatrix
has not yet made it into any release yet, I think this can be safely done without worrying about backwards compatibility.Thoughts?
The text was updated successfully, but these errors were encountered: