Re: Re-ordering columns or rows of an array efficiently



On 29 nov, 05:17, Mike <mkjoh...@xxxxxxxxx> wrote:
Many thanks to all for the replies and suggestions. I will try each of
the suggestions to see which is most efficient for my application. In
this case, there are more than 10,000 rows and columns in a square
array. The re-ordering is unique. Again, thanks to everyone for making
my process of moving from MATLAB to FORTRAN as simple as possible. :)

Best regards,

Mike

A last solution : you could also never reorder the array just keeping
in parallel the initial array and the permutation vector (and possibly
the reverse permutation vector too). This is often what I do with
large matrices initialized under a fixed form but inversed taking into
account a permutation ...
.



Relevant Pages

  • Re: Data compression in roguelikes
    ... Gerry Quinn wrote: ... think Breshenham circle drawing algorithm is simple too). ... scan the enclosing square. ... whatever language that is that you don't go outside the map array, ...
    (rec.games.roguelike.development)
  • Re: Chess boards & connections.
    ... and 16 for White to start, and since each pawn ... How many choices for a square do ... All I needed was the 2D Array ... complications when calculating possable moves. ...
    (sci.math)
  • Re: Segmentation Fault
    ... it still dumps core (but it takes a little longer to do ... gdb instantly shows me that it crashed on line 10. ... So you're trying to run i all the way up to INT_MAX, square it, and use ... that as an index into an array of INT_MAX elements. ...
    (comp.lang.c)
  • Re: Chess boards & connections.
    ... How many choices for a square do ... All I needed was the 2D Array ... Well then provide the needed Array, ... if your math skills indicate your programming skills, ...
    (sci.math)
  • Re: Chess boards & connections.
    ... How many choices for a square do ... All I needed was the 2D Array ... Well then provide the needed Array, ... if your math skills indicate your programming skills, ...
    (sci.math)