[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Importing a sparse matrix to Octave
From: |
John W. Eaton |
Subject: |
Re: Importing a sparse matrix to Octave |
Date: |
Fri, 24 Jul 2009 21:17:49 -0400 |
On 24-Jul-2009, Chong Yidong wrote:
| "John W. Eaton" <address@hidden> writes:
|
| > On 24-Jul-2009, Jaroslav Hajek wrote:
| >
| > | No, not yet. A futher requirement is that the row indices should be
| > | sorted (for a certain column index).
| >
| > Is that necessary? For example, loading
| >
| > # name: s
| > # type: sparse matrix
| > # nnz: 5
| > # rows: 10
| > # columns: 10
| > 1 1 1
| > 6 2 6
| > 4 2 4
| > 5 2 5
| > 3 6 3
| >
| > appears to work.
|
| No, Jaroslav's right. If the indices are out of order, some kind of
| corruption takes place that prevents some matrix operations. With the
| above file:
|
| octave:1> load "foo.dat"
| octave:2> [L,U] = splu(s)
| error: SparseLU::SparseLU symbolic factorization failed
| warning: Invalid matrix type
|
| If I re-order the file as
|
| # name: s
| # type: sparse matrix
| # nnz: 5
| # rows: 10
| # columns: 10
| 1 1 1
| 4 2 4
| 5 2 5
| 6 2 6
| 3 6 3
|
| then the LU factorization proceeds without an error.
OK. Then I think we should either issue a warning if the indices are
not ordered properly, or sort them so they are.
Thanks,
jwe
- Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24
- Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, Jaroslav Hajek, 2009/07/24
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/24
- Re: Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24
- Re: Importing a sparse matrix to Octave,
John W. Eaton <=
- Re: Importing a sparse matrix to Octave, John W. Eaton, 2009/07/29
- Re: Importing a sparse matrix to Octave, Carlo de Falco, 2009/07/24
- Re: Importing a sparse matrix to Octave, Chong Yidong, 2009/07/24