|No such thing as a small change|
Re: Re: Variant permutationby gmax (Abbot)
|on Aug 31, 2003 at 09:37 UTC||Need Help??|
An example would be better than any explanation.
Take this schema, and see why I said that order is important and I take the variation only when the last one is changing.
For every location I list the departments; for each department a breakdown by gender (columns a b d e n o p q s t), followed by a department total (columns c f i o r u). Then there is a breakdown by location (columns g h v w) with its grand total (columns l x).
If I permute 'USA'-'m' before 'USA'-'pers'-'m' I am breaking the schema.
The algorithm I am dealing with is a little more complex than this, since it is taking information about where to find each item, and generating code to retrieve the relevant data from a database.
The permutations are needed to create the appropriate conditions for retrieving each column of data. All the conditions are merged together into a giant SQL statement that will fetch the data according to my instructions (SUM, COUNT, AVG).
More on this subject when I adjust nicely all the above into a module. :)
_ _ _ _ (_|| | |(_|>< _|