Re: [eigen] [Sparse][LU] scale factors

[ Thread Index | Date Index | More lists.tuxfamily.org/eigen Archives ]


On Wed, Nov 10, 2010 at 10:54 AM,  <bernard.hugueney@xxxxxxxxxx> wrote:
>
> Hi,
> I'm using SuperLU and UmfPack backends for Sparse matrix LU decompositions.
> Those backends expose the P and Q permutations, but not the scaling factors
> (I believe that SuperLU backend gets them but does not give access[0], while
> UmfPack backend does not read the
> scaling factors [1], for UmfPack, one would also need acces to the do_recip
> flag).
>
> Are there some strong reasons not to provide those access ?

no particular reason...

> PS: Is there a "nice" way to convert the permutations vectors to sparse
> matrices such that P* and *Q do the permutation ?

The best would be to support products such as: PermutationMatrix times
a sparse matrix.

> I'm well aware that this would not be the proper way to perform those
> permutations, but I need thoses sparse matrices anyway
> , and my current code reading the values in the vectors and setting the 1..
> by hand in the sparse matrix feels ugly.

Feel free to provide a patch adding:

template<int Size, int SizeAtCompileTime>
Derived& operator=(const PermutationMatrix<Size,SizeAtCompileTime>& perm);

into SparseMatrixBase;

gael.


> PS2: I saw that Scipy patched SuperLU [2], and while I'm against embedding
> libraries, those patches seem serious ☹
>
> [0]
> https://bitbucket.org/eigen/eigen/src/tip/unsupported/Eigen/src/SparseExtra/SuperLUSupport.h#cl-370
> [1]
> https://bitbucket.org/eigen/eigen/src/10990f843213/unsupported/Eigen/src/SparseExtra/UmfPackSupport.h#cl-306
> [2]
> http://projects.scipy.org/scipy/log/trunk/scipy/sparse/linalg/dsolve/SuperLU/SRC?rev=6355
>
>
>



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/