Re: Ohmygod, another round of column/row-major... [message #14437] |
Thu, 04 March 1999 00:00 |
mgs
Messages: 144 Registered: March 1995
|
Senior Member |
|
|
In article <MPG.11470ba1b8e5e802989702@news.frii.com>, davidf@dfanning.com
(David Fanning) wrote:
> Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:
>
>> Well ... a long article.
Regarding the new entry in the FAQ, how about if I just list the names of
people who would be willing to explain the idea? In 1000 words or less :-)
> My God, if that is not the last word on this subject
> I *really* don't want to hear it! :-)
Why do I have this feeling of deja vu? Again?
> P.S. I'm going to put the whole messy discussion in an
> article on my web page. I figure it will have computer
> anthropologists scratching their heads for centuries.
Great idea. Actually, when I first included it in the FAQ, I dropped by
David's site looking for a condensed version. No luck. David, can you
shorten it down to about 2 lines while you're at it?
--
Mike Schienle Interactive Visuals, Inc.
mgs@ivsoftware.com Remote Sensing and Image Processing
http://www.ivsoftware.com/ Analysis and Application Development
|
|
|
Re: Ohmygod, another round of column/row-major... [message #14438 is a reply to message #14437] |
Thu, 04 March 1999 00:00  |
Dr. G. Scott Lett
Messages: 14 Registered: February 1998
|
Junior Member |
|
|
Yes, Fortran does have array operations, but the concepts of 'row' and
'column' don't really apply. More to the point, Fortran has a _matrix_
operation, MATMUL, that assumes that an array is represented by a two
dimensional array in column-major order. For Fortran, this means that a
matrix is accessed as (row, column). Most mathematics texts and papers
index matrices with subscripts in the same order.
The old standard FORTRAN's didn't have array or matrix operations, so it was
up to the people designing FORTRAN matrix/linear algebra software to decide
if they preferred row-major or column-major. According to the LINPACK
Users' Guide, the designers of LINPACK chose column major order (they called
it 'column oriented') to improve performance on 'operating systems with
paging and cache memory.' The authors point out that the BLAS, upon which
LINPACK was based, allow matrices to be accessed by rows instead of columns,
so that a matrix could be represented by a two dimensional array, accessed
as (column, row), but LINPACK works only one way. EISPACK followed the same
convention as LINPACK, and most similar libraries followed this convention.
IDL is not quite Fortran, not quite C.
Flame on, brothers and sisters.
Axel vom Endt <endt@bu.edu> wrote in message
news:36DE990B.5136E2EF@bu.edu...
> Steve Scheele wrote:
>
>> Fortran is column-major, and IDL was originally written in Fortran. I
assume
>> that this is the reason that IDL is column-major. However, since Fortran
has
>> no array arithmetic, it seems somewhat irrelevant at this point.
>
> Now that's a statement I cannot resist to comment on. Fortran *does*
> have array arithmetic, along with a number of nice features C is
> lacking. It does have it for nine years now, time to make the news
> heard.
>
> You are not talking about this old thing from 1977 called FORTRAN (all
> caps), are you? :-)
>
> Axel
|
|
|
Re: Ohmygod, another round of column/row-major... [message #14440 is a reply to message #14437] |
Thu, 04 March 1999 00:00  |
Axel vom Endt
Messages: 9 Registered: March 1999
|
Junior Member |
|
|
Steve Scheele wrote:
> Fortran is column-major, and IDL was originally written in Fortran. I assume
> that this is the reason that IDL is column-major. However, since Fortran has
> no array arithmetic, it seems somewhat irrelevant at this point.
Now that's a statement I cannot resist to comment on. Fortran *does*
have array arithmetic, along with a number of nice features C is
lacking. It does have it for nine years now, time to make the news
heard.
You are not talking about this old thing from 1977 called FORTRAN (all
caps), are you? :-)
Axel
|
|
|
Re: Ohmygod, another round of column/row-major... [message #14452 is a reply to message #14437] |
Wed, 03 March 1999 00:00  |
Steve Scheele
Messages: 6 Registered: February 1999
|
Junior Member |
|
|
Since I am new to this news group and missed all the earlier fun on the
column/row major debate, I thought I would jump in here.
> The current text (version 5.2) says the *exact* opposite, namely
> that C/Pascal etc. are column-major!!
C does not have true multi-dimensional arrays. It does fake
multi-dimensional arrays however by using arrays of pointers to arrays, etc.
In that sense 2-dimensional C arrays in row-major order (Ref: Harbison &
AStteele, p135).
Fortran is column-major, and IDL was originally written in Fortran. I assume
that this is the reason that IDL is column-major. However, since Fortran has
no array arithmetic, it seems somewhat irrelevant at this point.
I had never heard of column-major arrays until I encountered it when helping
my (then) 12-year old son with new math. It drove me batty then (20 years
ago) and it drives me batty now when I try to do matrix arithmetic using
IDL. Even my most recent text books use row-major arrays. Every formula I
take from the literature must be translated to column-major format.
However, it does appear unlikely that IDL will change to row-major. I think
that the only solution is to change the other 99.999% of the world :)
|
|
|
Re: Ohmygod, another round of column/row-major... [message #14455 is a reply to message #14452] |
Wed, 03 March 1999 00:00  |
davidf
Messages: 2866 Registered: September 1996
|
Senior Member |
|
|
Stein Vidar Hagfors Haugan (steinhh@ulrik.uio.no) writes:
> Well ... a long article.
My God, if that is not the last word on this subject
I *really* don't want to hear it! :-)
Cheers,
David
P.S. I'm going to put the whole messy discussion in an
article on my web page. I figure it will have computer
anthropologists scratching their heads for centuries.
--
David Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438 E-Mail: davidf@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
|
|
|