On Dec 19, 2007 12:40 AM, Phrogz <phrogz / mac.com> wrote:
> >
> > Use a database - they're written to solve this exact problem!
>
> What does that look like? Given n tables of entries, you have a single
> extra table with n columns, where each row enumerates a given possible
> combination? And then you just query that table to get a flat list of
> all possible combinations, and then spin through the rows and build up
> your arrays of possibilities?
>
> Not a bad suggestion, and so simple.

Why do you even need the n tables of entries? Since your data is
simply a set of points in a multidimensional space, you could have a
single table where the columns correspond to the axes and the rows are
the coordinates of the point on each axis. Searching is simply a
matter of synthesising sql statements to select subsets.

martin