• Log in or sign up for an account here: https://www.sythe.org/login

Is this matrix in row-wise form?

kmjt

-.- The nocturnal life chose me -.-

Banned
Joined
Aug 21, 2009
Sythe Gold
449
Messages
14,450
Location
Canada
Say we have matrix like:

{0, 1, 2}
{3, 4, 5}



And a question asked to print out the matrix in row-wise form. Would the following be row wise form?

{0, 3}
{1, 4}
{2, 5}



Or is it asking to maybe print out the numbers like this?

0, 3, 1, 4, 2, 5



A bit confused by the terminology.
 
Say we have matrix like:

{0, 1, 2}
{3, 4, 5}



And a question asked to print out the matrix in row-wise form. Would the following be row wise form?

{0, 3}
{1, 4}
{2, 5}



Or is it asking to maybe print out the numbers like this?

0, 3, 1, 4, 2, 5



A bit confused by the terminology.
According to this http://en.wikipedia.org/wiki/Row-major_order ...
Row form describes how they're stored. You're going from column down, you should go row down.
It should be 0 1 2 3 4 5 or
array[0]=1
array[1]=2
array[2]=3
array[3]=4
array[4]=5
 
According to this http://en.wikipedia.org/wiki/Row-major_order ...
Row form describes how they're stored. You're going from column down, you should go row down.
It should be 0 1 2 3 4 5 or
array[0]=1
array[1]=2
array[2]=3
array[3]=4
array[4]=5


I believe displaying something as row-wise is different. Row major order and column major order are the internal implementations of how it is stored in memory if I am not mistaken.
 
I believe displaying something as row-wise is different. Row major order and column major order are the internal implementations of how it is stored in memory if I am not mistaken.

What else might it be. I googled "row-wise form" and this thread is the first that comes up. Email your teacher maybe because the question isn't clear.
 
What else might it be. I googled "row-wise form" and this thread is the first that comes up. Email your teacher maybe because the question isn't clear.


It isn't a school question just something I stumbled upon that is weirding me out. A 2d java array (for example) is implemented row major but that doesn't mean someone only has the option to display it in the way it was implemented. Someone could choose to display it as what the column major implementation would look like but that doesn't change the fact that it is implemented internally as row major. Maybe I am wrong.
 
<3 n4n0
Discord Verified
Two Factor Authentication User
Community Participant
Spam Forum Participant
Sythe's 10th Anniversary
Sythe Awards 2011 Winner
Just do some math and you can print it out however you want.
 
Runescape Gamblingrunescape gambling
Back
Top