THis would work if I.^:_1 were defined. Not a compelling use, but probably
efficient for sparse boolean vectors:
s =. 2 : ';@:(<@:u;.1~ v)'
db2 =. (#~ >:@:i.@:#) s (1 ~: +/\^:_1) &. (__&,) &. I.
By the way, what happened to ';' = <;.1 b. _1 ? This gives nonce error now
(hence the conjunction s ). Is this related to the proposed new inverse,
which used to be modelled at
http://www.jsoftware.com/jwiki/Essays/Block_Matrices ?
-Dan
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm