On Mon, Jan 28, 2013 at 3:26 PM, Devon McCormick <[email protected]> wrote:
> So you want a mapping like this (top to bottom row):
>    (([: , [: |. |:),:~[:,]) ,&.>/~ i. 3
> +---+---+---+---+---+---+---+---+---+
> |0 0|0 1|0 2|1 0|1 1|1 2|2 0|2 1|2 2|
> +---+---+---+---+---+---+---+---+---+
> |0 2|1 2|2 2|0 1|1 1|2 1|0 0|1 0|2 0|
> +---+---+---+---+---+---+---+---+---+

Yes, I think the above is a correct mapping in the second row.

>
> For any starting coordinate,
>    fliptp2D=: 4 : '({:y),x-{.y'
>
> So,
>       2 fliptp2D &.> ,,&.>/~ i. 3
> +---+---+---+---+---+---+---+---+---+
> |0 2|1 2|2 2|0 1|1 1|2 1|0 0|1 0|2 0|
> +---+---+---+---+---+---+---+---+---+
>
> where the left argument is the row max.
>

Yes, but my real inputs are i. 9, not index pairs.

>
> On Mon, Jan 28, 2013 at 3:10 PM, Brian Schott <[email protected]>wrote:
>

-- 
(B=)
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to