Ok... so here's a routine which gives us all the truth valued arrays with n axes: rntt=: (#2:) $"1 [: #:@i. 2>. 2^2*]
And, here's a test to see if an n-dimensional truth table is degenerate: degenerate=: 1 e. (1 ]\. i.@#@$) -:/@|: ] (Use with "_1 on a result from rntt) But I don't understand what a dual would be for an arbitrary truth valued array with an arbitrary number axes, so I'm not quite sure how I would write that test. For example, if I implement: Glock=: $ #: I.@, dual=: (-:&(/:~) -.)&Glock selfdual=: dual~ I find four self-dual arrays of rank 2: (#~ selfdual"_1) rntt 2 0 0 0 0 0 1 1 0 1 0 0 1 1 1 1 1 What's a dual of a truth table array with arbitrary axes? Thanks, -- Raul ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
