[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Sparse functions for octave
From: |
A+A Adler |
Subject: |
Re: Sparse functions for octave |
Date: |
Mon, 15 Nov 1999 20:26:58 -0500 (EST) |
On Sat, 13 Nov 1999, John W. Eaton wrote:
> | Now, I need to add indexing to sparse matrices, to that you can
> | do:
> | x(1:2,1:2) for sparse x.
>
> You need to define a function called do_index_op() with the following
> signature:
>
> octave_value do_index_op (const octave_value_list& idx)
>
> For example, look at ov-base-mat.cc.
Unfortunately, I don't seem to be able to get this to work.
For example, I added the following code to the public
methods of make_int.cc:
octave_value do_index_op (const octave_value_list& idx) {
if (idx.length() == 1)
return (double) scalar;
else
error("idx !=1");
}
But I still get the following error
octave-2.1.19:1> x=make_int(1);
installing integer type at type-id = 18
octave-2.1.19:2> x(1)
error: can't perform indexing operations for integer type
______________________________________________________________
Andy Adler, address@hidden
-----------------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.che.wisc.edu/octave/octave.html
How to fund new projects: http://www.che.wisc.edu/octave/funding.html
Subscription information: http://www.che.wisc.edu/octave/archive.html
-----------------------------------------------------------------------
- Re: Sparse functions for octave, A+A Adler, 1999/11/13
- Re: Sparse functions for octave, John W. Eaton, 1999/11/13
- Re: Sparse functions for octave,
A+A Adler <=
- Re: Sparse functions for octave, John W. Eaton, 1999/11/15
- Re: Sparse functions for octave, A+A Adler, 1999/11/16
- Re: Sparse functions for octave, John W. Eaton, 1999/11/16
- Re: Sparse functions for octave, A+A Adler, 1999/11/26
- Re: Sparse functions for octave, Mike Miller, 1999/11/27
- Re: Sparse functions for octave, John W. Eaton, 1999/11/28