Choice of data structures

From: Jon Boone (ipmonger_at_comcast.net)
Date: 09/26/04


Date: Sun, 26 Sep 2004 12:59:21 -0400

Folks,

  I'm looking for some insight into choosing appropriate data structures for
a program that I'm working on. Right now it's in the "design" stage where I
am working out the different parts of the program and how they will work
together.

  The fundamental data that I will work with is a series of variables that
are entered on a periodic basis (perhaps as often as once a day). Not all
variables will receive data daily.

  There are fundamentally two things I will use the data for:

  1. Displaying textual/graphical output to the user to provide a means for
      them to easily determine the data trends. Add on modules will color
      code the data outputs to indicate important analytical properties.

      In typical usage, I imagine that not all variables will be graphed
      simultaneously, although I intend to support that.

  2. Perform statistical testing on the data to highlight correlations that
      that exist (and that the user might not think to display graphically).

  If I were programming this in C (or perl), I'd create a hash to store each
variable, keyed by the date that the data was collected. So, for 15
variables, I'd have 15 different hashes, all keyed the same.

  If I were trying to do this in an OOP style (with Java or C++), I'd
probably use some generic sequence data type (and implement it as a hash),
but otherwise still use 15 different sequences for 15 different variables.

  I believe that Common Lisp can support either of these styles without a
problem. My question is more oriented toward soliciting ideas that I have
not thought of in terms of ordering the data.

  Is there a better way to order the data in general [programming language
independent]?

  Is there a more powerful way to order the data that is reasonable to do in
Lisp but that I haven't thought of?

--jon



Relevant Pages

  • Re: I would appreciate a code review
    ... Common Lisp, unlike Scheme, does not treat tail calls as something ... (when (eql (car entry) ... for alists) or CAR. ... > probably use a hash table. ...
    (comp.lang.lisp)
  • Re: How do Lisp Hash Tables handle clashes?
    ... Lisp provided hash tables. ... How do Lisp Hash Tables handle clashes? ... Clashes aren't a concept in Common Lisp hash tables. ... CL is an ANSI-standard language. ...
    (comp.lang.lisp)
  • Re: Sparse matrices in Common Lisp? (with 3 dimentions)
    ... three-dimensional sparse matrices in Common Lisp (from what I see in the ... HyperSpec, there is no native support for them). ... You can use recursive hash tables. ... So the first index would be ...
    (comp.lang.lisp)