octave-maintainers
[Top][All Lists]
Advanced

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

Re: rewrite of structs - advice sought


From: CdeMills
Subject: Re: rewrite of structs - advice sought
Date: Wed, 23 Jun 2010 02:43:12 -0700 (PDT)


Jaroslav Hajek-2 wrote:
> 
> hi all,
> 
> a couple of weeks ago I started to work on a larger change to Octave,
> rewriting the C++ implementation of structs.
> 
> 

While you are at it, could you consider the following problem ?

When manipulating real data, in most of the cases they have a meaning. For
instance, a matrix of measurement contains voltages in the first column,
frequencies in the second, capacitance in the third, current in the fourth,
and so on. The closest and simplest mapping is thus array of struct, but
currently saving and loading of ascii files don't cope automatically with a
first line of field names. Writing a small script in order to handle this
case is not that complicated, but is slower. May I suggest enhancing the
basic load and save operation, implementing something similar to R data
frame, which are:
  A data frame, a matrix-like structure whose columns may be of differing
types (numeric, logical, factor and character and so on).

Basically, load and save should try to return a structure array in case of a
first non-comment line of fields name, a matrix if all values are of similar
types, and an error code otherwise ?

Regards

Pascal
-- 
View this message in context: 
http://octave.1599824.n4.nabble.com/rewrite-of-structs-advice-sought-tp2264208p2265342.html
Sent from the Octave - Maintainers mailing list archive at Nabble.com.


reply via email to

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