Re-ordering columns or rows of an array efficiently
- From: Mike <mkjohnst@xxxxxxxxx>
- Date: Wed, 28 Nov 2007 13:47:38 -0800 (PST)
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
.
- Follow-Ups:
- Re: Re-ordering columns or rows of an array efficiently
- From: glen herrmannsfeldt
- Re: Re-ordering columns or rows of an array efficiently
- From: deltaseq0
- Re: Re-ordering columns or rows of an array efficiently
- From: Dan Nagle
- Re: Re-ordering columns or rows of an array efficiently
- Prev by Date: Re: Fortran Error Reporting Requirements (Was: GFORTRAN PROBLEM WITH SAVE STATEMENT)
- Next by Date: Re: Re-ordering columns or rows of an array efficiently
- Previous by thread: initializing an array of user-defined data types
- Next by thread: Re: Re-ordering columns or rows of an array efficiently
- Index(es):
Relevant Pages
|