--0016e646a4747a7dff0473a0f9bd
Content-Type: text/plain; charset=ISO-8859-1

Morning Matt,

On Tue, Sep 15, 2009 at 8:59 AM, Matt Brooks <mattbrooks / gatech.edu> wrote:

> I have an unique problem that I can't solve.  I am sorry this is long,
> but the details are needed to solve it I think.
>
> The reason I have to use an array of hashes that sometimes has an array
> of a hashes in it is as follows.
>
>
I don't have any specific solution here for you other then to suggest that
you might be very much limiting yourself by thinking only in terms of Arrays
and Hashes. This sounds like something where a nice object would be more
appropriate. It might take more "legwork" to develop a good layout here but
it would seem that you would be much better off.


> num_signals     #how many times this entire structure repeats(varies
> each time)
> signal_id       #regular variable easily saved in hash
> signal_freq     #regular variable easily saved in hash
> num_times_next_two_repeat   #next two fields repeat as a pair this #
> times
> parameter_name   #again this repeats with the below as a pair N times
> parameter_value  #again this repeats with the above as a pair N times
> signal_bandwidth    #regular variable easily saved in hash
>
>
Something like a Signal object with id, freq, and bandwidth as
attr_accessors along with parameters as a hash stored within the object
might be a nice starting point.

You could then have an array of Signal objects that would store the
individual signals.

John

--0016e646a4747a7dff0473a0f9bd--