Banded matrices, dgbbrd and indexing in clapack

Open discussion regarding features, bugs, issues, vendors, etc.

Banded matrices, dgbbrd and indexing in clapack

Postby janbth » Fri Apr 29, 2005 11:00 am

Dear Forum,

I'm trying to do an SVD of a tridiagonal matrix by using first dgbbrd
(bidiagonalization) and then dbdsdc (divide-and-conquer SVD). However,
I'm using clapack and can't get it to work. Probably I haven't done the
indexing correctly. I have tried to look at the comments and code in the
source files, but this is just confusing to me. (Looks like fortran indexing...)

Does anyone have any experience with this, and know how to properly index banded matrices?

Thanks!
Jan
janbth
 
Posts: 2
Joined: Fri Apr 29, 2005 10:43 am
Location: Oslo

Postby Julie » Fri Apr 29, 2005 4:15 pm

Jan,

What you try to do is reasonable: an SVD of a tridiagonal matrix by using first dgbbrd
(bidiagonalization) and then dbdsdc (divide-and-conquer SVD)

Let's take a basic tridiagonal Matrix A

2 1 0 0
1 2 1 0
0 1 2 1
0 0 1 2

A should look like this in a array
* 1 1 1
2 2 2 2
1 1 1 *

And like this in memory
index: 0 1 2 3 4 5 6 7 8 9
value: 2 1 1 2 1 1 2 1 1 2

as you noticed, it is column major (ie Fortran)

Hope it helps
Julie
Julie
 
Posts: 299
Joined: Wed Feb 23, 2005 12:32 am
Location: ICL, Denver. Colorado

Postby janbth » Mon May 02, 2005 7:35 am

Julie, thanks! I got it to work now.

I guess the indexing-scheme for this kind of banded matrix needs to be a bit
messy in clapack, because it is C translated from Fortran code. But thanks to your "memory map" I was able to experiment around and find it out.

I think there is a gap in the documentation here, when it comes to indexing
of special matrices, like banded ones. Perhaps the people responsible for
clapack would consider putting this on their todo-list...? :-)

Jan
janbth
 
Posts: 2
Joined: Fri Apr 29, 2005 10:43 am
Location: Oslo


Return to User Discussion

Who is online

Users browsing this forum: No registered users and 1 guest