octave-maintainers
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Help with [] for defined types


From: David Bateman
Subject: Re: Help with [] for defined types
Date: Mon, 26 Jul 2004 16:58:04 +0200
User-agent: Mutt/1.4.1i

Andy,

Take a look at the changes that just wented in to the octave CVS and the
code protected by

#ifdef HAVE_OCTAVE_CONCAT

#endif

in the main/comms and main/fixed directories of octave-forge that I
just now commited. I now have working concatenation, Fcat, Fhorzcat
and Fvertcat functions working with these types.

D.

According to Andy Adler <address@hidden> (on 07/05/04):
> OK, I understand why it is so hard now.
> 
> For stuff like your galois field types, which inherit from NDMatrix,
> they don't need to add to the conversion table in data.cc. However,
> doing this with sparse would need to add a new row and column.
> I suppose it would be (after testing with Matlab)
> 
>         //       re   cx   ch c  spre spcx
>         // --------------------
>         // re   |re   cx   ch X  spre spcx
>         // cx   |cx   cx   X  X  spcx spcx
>         // ch   |ch   X    ch X   X    X
>         // cell |X    X    X  c   X    X
>              spre  spre spcx X  X   spre spcx
>              spcx  spcx spcx X  X   spcx spcx
>         // (X means incompatible).
> 
> This appears to be a significant pain right now. I think I've
> decided to leave it for the moment (after all, the functions
> sphcat and spvcat exist)
> 
> Thanks
> 
> Andy
> 
> 
> On Mon, 5 Jul 2004, David Bateman wrote:
> 
> >
> > Unfortunately you need more than that.... At the moment "[]" is
> > hard-coded in pt-mat.cc in tree_matrix::rvalue. John talked about
> > doing something about this. See the threads.
> >
> > http://www.octave.org/octave-lists/archive/help-octave.2003/msg02027.html
> > http://www.octave.org/mailing-lists/octave-maintainers/2004/243
> >
> > Cheers
> > David
> >
> > According to Andy Adler <address@hidden> (on 07/05/04):
> > > I'm trying to get s1=[s2,s3] to work for the sparse type.
> > >
> > > Looking at the code in liboctave, it seems that you need
> > > to define a method:
> > >
> > >    int octave_sparse::cat (const octave_sparse& ra_arg, int dim, int iidx,
> > >        int move);
> > >
> > > I've tried defining this, but to no avail. Also, its not clear to me what
> > > the various parameters are, and what the method should return.
> > >
> > > Would some kind person mind clarifying this for me?
> > >
> > > Thanks
> > >
> > > Andy
> > >
> >
> > --
> > David Bateman                                address@hidden
> > Motorola CRM                                 +33 1 69 35 48 04 (Ph)
> > Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax)
> > 91193 Gif-Sur-Yvette FRANCE
> >
> > The information contained in this communication has been classified as:
> >
> > [x] General Business Information
> > [ ] Motorola Internal Use Only
> > [ ] Motorola Confidential Proprietary
> >

-- 
David Bateman                                address@hidden
Motorola CRM                                 +33 1 69 35 48 04 (Ph) 
Parc Les Algorithmes, Commune de St Aubin    +33 1 69 35 77 01 (Fax) 
91193 Gif-Sur-Yvette FRANCE

The information contained in this communication has been classified as: 

[x] General Business Information 
[ ] Motorola Internal Use Only 
[ ] Motorola Confidential Proprietary



reply via email to

[Prev in Thread] Current Thread [Next in Thread]