[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
RE: user data types
From: |
Paul Billings |
Subject: |
RE: user data types |
Date: |
Tue, 9 Aug 2005 12:50:50 -1000 |
It still appears that I am on the right track. Further research has turned
up a similar thread:
http://www.octave.org/octave-lists/archive/help-octave.2005/msg02767.html
My desire for a simple example is at:
http://wiki.octave.org/wiki.pl?CodaTypes
I know I need to define the subsref function (matlab), but I'm sure there's
something similar for octave.
Is there anything tricky to having a hierarchy of these types? I want a
base class with most of the functionality (e.g., subsref(), size(), etc.).
Subsref() would call a virtual function load_data() to get the specific
data. This virtual function would be defined in various subclasses (each
derived from the base class), where each subclass is specific to a
particular format (e.g., sequence of image files, custom format #1, custom
format #2, etc.)
Paul
> -----Original Message-----
> From: Billings, Paul [mailto:address@hidden
> Sent: Tuesday, August 09, 2005 11:52 AM
> To: address@hidden
> Subject: user data types
>
>
> I'd like to abstract a set of data to a 3-dimensional array (rows, cols,
> frames). I've implemented this capability in Matlab using
> objects, but I'm
> trying to move to Octave. This is one of my big roadblocks.
>
> Essentially, the object is smart enough to load data when it is
> referenced.
> I have implementations for a number of "formats". For example, a sequence
> of image files (f01.png, f02.png, ...) is abstracted. I can then
> do things
> like:
> a = img_data('*.png');
> [M, N, K] = size(a);
> for(i=1:K) imagesc(a(:,:,i)); title(i); pause; end;
>
> To implement such a capability in octave, I think it has to be done in an
> octfile. I have looked at the code in ov.h/cc, and there's a lot
> there. It
> sure looks like octave can do what I want, but I would feel better with a
> little confirmation. Am I barking up the right tree here?
>
> Paul
>
>
>
> -------------------------------------------------------------
> Octave is freely available under the terms of the GNU GPL.
>
> Octave's home on the web: http://www.octave.org
> How to fund new projects: http://www.octave.org/funding.html
> Subscription information: http://www.octave.org/archive.html
> -------------------------------------------------------------
-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.
Octave's home on the web: http://www.octave.org
How to fund new projects: http://www.octave.org/funding.html
Subscription information: http://www.octave.org/archive.html
-------------------------------------------------------------
- user data types, Billings, Paul, 2005/08/09
- RE: user data types,
Paul Billings <=