Adblock breaks this site

Is this matrix in row-wise form?

Discussion in 'Programming General' started by kmjt, Oct 21, 2014.

  1. kmjt

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449
    Is this matrix in row-wise form?

    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.
     
  2. 70i

    70i Forum Addict
    Banned

    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174
    Is this matrix in row-wise form?

    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
     
  3. kmjt

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449
    Is this matrix in row-wise form?


    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.
     
  4. 70i

    70i Forum Addict
    Banned

    Joined:
    Jan 11, 2014
    Posts:
    462
    Referrals:
    0
    Sythe Gold:
    174
    Is this matrix in row-wise form?

    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.
     
  5. kmjt

    kmjt -.- The nocturnal life chose me -.-
    Banned

    Joined:
    Aug 21, 2009
    Posts:
    14,450
    Referrals:
    8
    Sythe Gold:
    449
    Is this matrix in row-wise form?


    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.
     
  6. SuF

    SuF Legend
    Pirate Retired Global Moderator

    Joined:
    Jan 21, 2007
    Posts:
    14,212
    Referrals:
    28
    Sythe Gold:
    1,234
    Discord Unique ID:
    203283096668340224
    <3 n4n0 Two Factor Authentication User Community Participant Spam Forum Participant Sythe's 10th Anniversary
    Is this matrix in row-wise form?

    Just do some math and you can print it out however you want.
     
  7. Blupig

    Blupig BEEF TOILET
    $5 USD Donor

    Joined:
    Nov 23, 2006
    Posts:
    7,145
    Referrals:
    16
    Sythe Gold:
    1,609
    Discord Unique ID:
    178533992981594112
    Valentine's Singing Competition Winner Member of the Month Winner MushyMuncher Gohan has AIDS Extreme Homosex World War 3 I'm LAAAAAAAME
    Off Topic Participant
    Is this matrix in row-wise form?

< Looking for an idea to get myself the C# Programmer rank....ideas!? | RasPi Question >


 
 
Adblock breaks this site