Subj : Re: Faster matrix permutation algorithm? To : comp.lang.c,comp.programming From : russell kym horsell Date : Sun Aug 14 2005 04:23 am In comp.lang.c Jack Middleton wrote: > Hi! > I'm lookin for a faster permutation algorithm for matrices. I know that > it can be done with multiplying a matrix with a permutation matrix. It > just seems a waste to iterate through all those zeroes. Is there an > algorithm for matrixes that is optimized just for permutations? The > matrices that I use are fairly small (around 6*6) and I only use > positive integers as elements. [...] If you want to permute rows/cols (or both) then you can simply iterate through one or more maps/indexes. Manipulate the maps directly and only use them as indexes at the last second. ========== Before you ask a question you must know most of the answer. -- anon .