I much appreciate your help with this. I'm quite impressed that the whole problem could be compressed to this. MaxLevel was originally introduced because one need only compute up to a certain level and then apply the Dynkin Automorphism group (it acts by multiplying a permutation of the weight by -1) to the results in order to obtain all possible weights. This seems to go up to the maximum level. Now comes the task of trying to understand the code.
Thanks, Justin On 15 September 2010 18:03, Raul Miller <[email protected]> wrote: > Here is yet another "slightly cleaner" version: > > byLevel=: 4 :0 > mask=. </~i.{:$y > reflect=. 0&< * ] -"1"1 2 x *"2 1 ] > keep=. (0 < ^&mask"2) >&(*./"1) =&0 > weights=. currentLevel=.,:y > while.#currentLevel =. (keep #&(,/) ]) reflect currentLevel > do.weights=. weights, currentLevel > end. > ) > > Usage: > A =: 2-4|6<.|(-|:)i.4 4 > A byLevel 1 1 1 1 > > -- > Raul > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm > ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
