Re-ordering columns or rows of an array efficiently



Hi,

I'm somewhat new to FORTRAN, and just have what is probably a simple
question to which I've been unable to find the answer (after much
Googling).

I need to re-order the columns of an array. The way that I've done
this is to construct a vector of integers E which contains the desired
order of the columns, and then I do this:

A0=A(:,E)
A=A0

Of course, this requires having a matrix the size of A allocated
twice. Since A is several gigabytes on my system, this is a rather
undesirable way to do things. Yet, I get errors if I try something
like A=A(:,E). Can anyone suggest a way of doing this that doesn't
require as much memory?

Best regards,

Mike
.



Relevant Pages

  • Re: Re-ordering columns or rows of an array efficiently
    ... I'm somewhat new to FORTRAN, and just have what is probably a simple ... Googling). ... I need to re-order the columns of an array. ... Since A is several gigabytes on my system, ...
    (comp.lang.fortran)
  • Re: The intelligence of compiler
    ... Fortran 77 standard that prohibits side effects. ... RAN used twice in an expression, ... a hardware random number generator, and so have no saved state. ... but a very restricted subset of expressions. ...
    (comp.lang.fortran)
  • Re: OT quizz - no googling!
    ... (no googling!) ... Cat(the wonders of learning something new twice a day every day) ... Yes, Cat, I can definitely see lagomorph in you. ...
    (soc.culture.irish)
  • Re: OT quizz - no googling!
    ... (no googling!) ... Cat(the wonders of learning something new twice a day every day) ... I'm an endomorph and have been fighting it for years. ...
    (soc.culture.irish)
  • Re: collapsible lists in FrontPage
    ... You posted this twice. ... you should find some help by googling for the text you wrote. ... "FontPage novice" <FrontPage novice@discussio ...
    (microsoft.public.frontpage.client)