> Van: [email protected] [mailto:programming- > [email protected]] Namens Raul Miller (...) > > On Wed, Mar 3, 2010 at 2:20 PM, R.E. Boss <[email protected]> wrote: > > No. > > > > <oblq i.2 3 4 > > |assertion failure > > | (=<.)rnk2=:-:#$y > > I explicitly left odd ranks unhandled because I had not yet > decided how I should deal with them. > > That said, note that ,: will convert an odd ranked array to > an even ranked array. > > So you might replace that first line with > rnk2=: <.-:#$y > > That said, note that my model of "oblique" will > be incompatible with the existing /. for higher ranked > arrays. Given how it works, it might be desirable to > ignore trailing dimensions in y corresponding to the > monadic rank of u. > > But I was just modelling the underlying mechanism, and > not providing a complete implementation. > > > obl=: 1 : '(+/"1)@(#: [:i. */)@$ u/. ,' > > Consider this case: > > (i.2 3 5) +/oblq@(*/) i.1 2 3 >
My proposal for a generalization of the monad /. (oblique) was selecting the hyper planes with atoms which coordinates sum up to a constant number. Your proposal is the hyper planes with atoms which odd coordinates plus its even coordinates add up to a constant set of numbers. This one is highly related to convolutions. In the 2-dimensional case, these proposals are both equal to /. (oblique) . <oblq i.2 3 3 2 +----+----------+-----------+-----+ |0 |1 6 |7 12 |13 | +----+----------+-----------+-----+ |2 18|3 8 19 24 |9 14 25 30 |15 31| +----+----------+-----------+-----+ |4 20|5 10 21 26|11 16 27 32|17 33| +----+----------+-----------+-----+ |22 |23 28 |29 34 |35 | +----+----------+-----------+-----+ <obl i.2 3 3 2 +-+--------+-------------------+---------------------------+---------------- -------+-----------+--+ |0|1 2 6 18|3 4 7 8 12 19 20 24|5 9 10 13 14 21 22 25 26 30|11 15 16 23 27 28 31 32|17 29 33 34|35| +-+--------+-------------------+---------------------------+---------------- -------+-----------+--+ R.E. Boss ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
