linbox-team / linbox

LinBox - C++ library for exact, high-performance linear algebra
https://linbox-team.github.io/linbox
GNU Lesser General Public License v2.1
83 stars 28 forks source link

Cleanup permutations #90

Open jgdumas opened 6 years ago

jgdumas commented 6 years ago

blackbox/permutation.h matrix/ BlasPermutation & MatrixPermutation

Is MatrixPermutation then same as blackbox/permutation.h ?

bdsaunders commented 6 years ago

The answer is yes, MatrixPermutation from matrix/matrix-permutation.h and Permutation from blackbox/permutation.h make the same representation. Meanwhile BlasPermutation is the Lapack style rep used in fflas/ffpack.

Five points:

  1. I don't see a need for two representations of permutations.
  2. I currently have an interest in providing a weighted permutation blackbox.
  3. I want to wrap fflas factorizations in the FIBBs (fast inverse blackbox) framework including the permutations,
  4. It seems to me that permutations belong in blackbox/, reserving matrix/ for sparse and dense representations.
  5. I'm not too happy with the BlasPermutation name (what is it to do with blas?). Perhaps LapackPermutation or simply Permutation can be the name?

I propose to do the following; please comment.

  1. Evolve the current blackbox/permutation.h to a weighted-permutation.h using that representation (having an array P where the permutation sends i to P[i] ). (In part this is a compromise to not throw away this representation altogether.)

  2. Move matrix/matrix-permutation.h to blackbox/permutation.h, holding the lapack style representation and wrapping the fflas/pack perms.

jgdumas commented 6 years ago

Sounds good to me !