|
Ublas : |
Subject: Re: [ublas] Banded matrix storage
From: Rutger ter Borg (rutger_at_[hidden])
Date: 2012-10-15 16:27:04
On 2012-10-15 18:09, Gunter Winkler wrote:
>
> Could you please provide a simple test program which checks the storage
> format? Then we (or maybe you) can create a new ticket.
>
> mfg
> Gunter
>
thanks for the response. I've attached a test program, its output is
shown below. I haven't created a ticket yet, because I would like to
make sure the test is correct first. I double-checked the 'expected
data()' values, to me they seem to be correct.
Cheers,
Rutger
Example data taken from http://www.netlib.org/lapack/lug/node124.html
Running banded_matrix < column_major > test
Full matrix
[5,5]((11,12,0,0,0),(21,22,23,0,0),(31,32,33,34,0),(0,42,43,44,45),(0,0,53,54,55))
data() of matrix
0 12 23 34 45 11 22 33 44 55 21 32 43 54 0 31 42 53 0 0
Expected data() of matrix
0 11 21 31 12 22 32 42 23 33 43 53 34 44 54 0 45 55 0 0
Running banded_matrix < row_major > test
Full matrix
[5,5]((11,12,0,0,0),(21,22,23,0,0),(31,32,33,34,0),(0,42,43,44,45),(0,0,53,54,55))
data() of matrix
0 11 21 31 12 22 32 42 23 33 43 53 34 44 54 0 45 55 0 0
Expected data() of matrix
0 0 11 12 0 21 22 23 31 32 33 34 42 43 44 45 53 54 55 0