See what minors does:
minors=: }."1 @ (1&([\.))
minors i. 4 4
5 6 7
9 10 11
13 14 15
1 2 3
9 10 11
13 14 15
1 2 3
5 6 7
13 14 15
1 2 3
5 6 7
9 10 11
Remove the first column, and each row, producing a brick of minors.
v/@,`({."1 u . v $:@minors)@.(0<{:@$) @ ,. "2
,. applied at rank 2 has no effect on tables, and exists only to force
an atom or a list to be a table; so we can ignore the ,.
p`q@.(0<{:@$)
means 'do p if y is empty, otherwise q'. This q is going to reduce the
size of the array each time, and at the end, when there is no array
left, v/ will return the neutral for v .
({."1 u . v $:@minors)
This says recur on the minors ($:@minors) and then multiply the result
on the minors by the first column, the one we discarded in minors. And
the 'multiply' isn't just *, it's the DYAD of u . v, which for -/ . *
means multiply scalar * row, and then alternately add and subtract, as
you can see from considering -/\ i. 6 .
Henry Rich
On 5/15/2013 3:42 PM, Elton Wang wrote:
Can anyone please help me understand u. v on monad case?
For instance, -/ . * i.3, how's it get reduced step by step on the definition
below?
DET=: 2 : 'v/@,`({."1 u . v $:@minors)@.(0<{:@$) @ ,. "2' minors=: }."1 @
(1&([\.))
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm