[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Help with [] for defined types
From: |
Andy Adler |
Subject: |
Re: Help with [] for defined types |
Date: |
Tue, 27 Jul 2004 16:57:09 -0400 (EDT) |
On Mon, 26 Jul 2004, David Bateman wrote:
> Take a look at the changes that just wented in to the octave CVS and the
> code protected by
>
> #ifdef HAVE_OCTAVE_CONCAT
David,
I'm trying work this (and also load-save); I have many questions;
perhaps you can help.
QUESTION 1:
I'm trying to get a working 'concat'. I have defined
octave_sparse concat (const octave_sparse& ra,
const octave_sparse& rb,
const Array<int>& ra_idx)
and
octave_sparse& octave_sparse::insert( ...
However, I get:
$ echo 's=sparse(eye(2)); t=[s,s];' | octave -q
error: octave_base_value::resize (): wrong type argument `sparse'
error: octave_base_value::resize (): wrong type argument `<unknown type>'
This is similar to my problem in question #2.
QUESTION 2:
I have a working save_ascii, as well as what I think
should be a working load_ascii.
However, when I call 'load' I get this error
$ echo 'x=diag([1,2,3])*pi;s=sparse(x); save x s' | octave -q
$ cat x
# Created by Octave 2.1.57, Tue Jul 27 16:06:41 2004 EST <address@hidden>
# name: s
# type: sparse
# nnz: 3
# rows: 3
# columns: 3
1 1 3.14159265358979
2 2 6.28318530717959
3 3 9.42477796076938
$ echo 'load x' | octave -q
error: octave_base_value::load_ascii(): wrong type argument `<unknown type>'
error: load: reading file x
Could these problems be because sparse inherits from
octave_base_value? When I try to make it inheret from
something else, such as Marray2<double>, I get errors like
make_sparse.h:334: error: syntax error before `<' token
(line 334 is "octave_sparse : public Marray2<double>")
QUESTION 3:
I would like to get a working save to the mat-binary. Is this
the format from 'save_binary'? If so, I can't see how to
get the custom variable headers that Matlab requires for its
sparse type.
QUESTION 4:
./configure in octave-forge doesn't seem to define
HAVE_OCTAVE_CONCAT. Am I doing something wrong?
--
Andy Adler
- Re: Help with [] for defined types, (continued)
- Re: Help with [] for defined types, Paul Kienzle, 2004/07/07
- Re: Help with [] for defined types, David Bateman, 2004/07/08
- Re: Help with [] for defined types, Paul Kienzle, 2004/07/08
- Re: Help with [] for defined types, David Bateman, 2004/07/08
- Re: Help with [] for defined types, David Bateman, 2004/07/08
- Attn: Patch (Fcat and [] for defined types), David Bateman, 2004/07/12
- Re: Attn: Patch (Fcat and [] for defined types), David Bateman, 2004/07/12
- Re: Help with [] for defined types, Andy Adler, 2004/07/08
- Re: Help with [] for defined types, David Bateman, 2004/07/08
- Re: Help with [] for defined types, David Bateman, 2004/07/26
- Re: Help with [] for defined types,
Andy Adler <=
Re: Help with [] for defined types, David Bateman, 2004/07/27
Re: Help with [] for defined types, Andy Adler, 2004/07/28