Welcome, Guest
Username: Password: Remember me
  • Page:
  • 1
  • 2

TOPIC: Value notation for multi-dimensional arrays

Value notation for multi-dimensional arrays 21 Jun 2004 07:25 #6721

In einer eMail vom 17/06/2004 08:25:02 GMT Daylight Time schreibt
This email address is being protected from spambots. You need JavaScript enabled to view it.:

Hi Claude,
Hi Alexey,

Oopps, I stand corrected, the most common approach is indeed column major.
I guess after 20 years or so of having looked at this I've forgotten what is
most
common.

So to re-iterate:

The most common approach is to use the column of rows structure.

So, you are correct, C-style, C++, or Java approach is the way to go.

Cheers,

Claude.




In my opinion it should be C-style as Stephan has pointed out as the most
intuitive to the user. It would be otherwise difficult to explain to the
users why TTCN-3 is doing things in its own non-conventional way that is
different from C, C++, Java and I guess many other commonly used languages
and what is the actual reason for doing so.

Best regards,
Alexey Mednonogov

Software Engineer
OpenTTCN Oy
www.openttcn.com

Claude Desroches wrote:

>I feel better already reading your comment. Somehow, I felt that the
>issue had not been addressed completely. Row major or column major
>array initialization looks different from a notational point of view,
>but internally, need not. The most common approach is Row major.
>It is for the most part the more intuitive choice, however, others
>might see this differently. Comments from the list would be
>useful.
>
>




Claude Desroches email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Solonplatz 3/2 phone: +49 30 9606 7986
13088 Berlin fax: +49 30 9606 7987
Germany
The administrator has disabled public write access.

Value notation for multi-dimensional arrays 21 Jun 2004 07:44 #6722

Hi again,

My curiosity led me to dig out some of my old notes, yes, those mounds of
paper,
we all store in boxes and swear never to return to after having graduated...

It turns out that Stephan and I were saying the same thing, unbeknownst to
myself,
(and probably others also), the column of rows structure it turns out, is
indeed
called row major.

I quote from:
Programming Languages (2nd edition) Design and Implementation:

Most common is the column -of-rows structure in which the matrix is
considered as a vector in which each element is a subvector representing one row
of
the original matrix. This representation is known as row-major order. In
general an array of any number of dimensions is organized in row-major order
when the array is first divided into a vector of subvectors for each element in
the range of the first subscript, then each of these subvectors is subdivided
into subsubvectors for each element in the range of the second subscript,
etc.

Column major order is the representation in which the matrix is treated as a
single row of columns (as opposed to a single column of rows-> row major)...

Cheers,


Claude.

Hi Alexey,



Oopps, I stand corrected, the most common approach is indeed column major.
I guess after 20 years or so of having looked at this I've forgotten what is
most
common.

So to re-iterate:

The most common approach is to use the column of rows structure.

So, you are correct, C-style, C++, or Java approach is the way to go.

Cheers,

Claude.




In my opinion it should be C-style as Stephan has pointed out as the most
intuitive to the user. It would be otherwise difficult to explain to the
users why TTCN-3 is doing things in its own non-conventional way that is
different from C, C++, Java and I guess many other commonly used languages
and what is the actual reason for doing so.

Best regards,
Alexey Mednonogov

Software Engineer
OpenTTCN Oy
www.openttcn.com

Claude Desroches wrote:

>I feel better already reading your comment. Somehow, I felt that the
>issue had not been addressed completely. Row major or column major
>array initialization looks different from a notational point of view,
>but internally, need not. The most common approach is Row major.
>It is for the most part the more intuitive choice, however, others
>might see this differently. Comments from the list would be
>useful.
>
>




Claude Desroches email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Solonplatz 3/2 phone: +49 30 9606 7986
13088 Berlin fax: +49 30 9606 7987
Germany





Claude Desroches email: This email address is being protected from spambots. You need JavaScript enabled to view it.
Solonplatz 3/2 phone: +49 30 9606 7986
13088 Berlin fax: +49 30 9606 7987
Germany
The administrator has disabled public write access.
  • Page:
  • 1
  • 2

FacebookTwitterGoogle BookmarksRedditNewsvineTechnoratiLinkedin