Boost logo

Ublas :

From: Gunter Winkler (guwi17_at_[hidden])
Date: 2007-11-22 19:22:37

Am Donnerstag, 22. November 2007 11:23 schrieb dariomt_at_[hidden]:
> Anyone can explain a bit about permutation_matrix class in lu.hpp,
> please. I assume that it stores value i at position i.

the permutation class in lu.hpp is actually a "swap-list" as produced by
the LU factorization with pivoting algorithm. By default it is
initialized as the identity permutation. Please refer to the swap_rows
functions in lu.hpp for an example how to use such a permutation.

e.g. the permutation (3,2,3) means that the first element is swapped
with the third, the second and the (new) third stay unmodified. Thus
the permutation maps (a,b,c) to (c,b,a). It is considered as an error
when the value of element i of the swap list is less than i.

> Maybe a a simpler (minimalistic) approach can be used:

This only represents the identity permutation.