[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Importing a sparse matrix to Octave
From: |
Chong Yidong |
Subject: |
Re: Importing a sparse matrix to Octave |
Date: |
Fri, 24 Jul 2009 18:56:29 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/23.0.96 (gnu/linux) |
Carlo de Falco <address@hidden> writes:
> If your code is free software you could also link it directly to
> octave-lib and let octave-lib handle the file format by doing
> something like:
>
> int main (void) {
> SparseComplexMatrix M (10, 10, 3);
> M (0, 0) = std::complex<double> (0, 1.14);
Thanks for the pointer. The C++ trick that lets you do
M (0, 0) = ...
escapes me. I presume the SparseComplexMatrix has some form of operator
overloading that handles things in a clever way. So if I want to access
the (i,j) matrix element, is it simply
std::complex<double> val;
val = M(i,j);
or is it more complicated?
- 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, 2009/07/24
- 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 <=