t=: 5 7 2 ?@$ 1e6
   s=: $t
   x=: </.t

   t -: (2{.s) $ (;x)/:;</.i.s
1



On Thu, Jan 31, 2013 at 10:28 AM, Raul Miller <[email protected]> wrote:

> Let's start with an arbitrary array:
>
>    A=: i. 2 3
>
> We can box oblique lines from this array:
>
>    </. A
> +-+---+---+-+
> |0|1 3|2 4|5|
> +-+---+---+-+
>
> However, the interpreter does not currently provide us with an inverse
> for this operation:
>
>    </.inv </. A
> |domain error
>
> One problem is that you cannot uniquely determine the first two
> elements of the shape of the original array by inspecting </.'s
> result:
>
>    (</. 5 7$0) -: </.7 5$0
> 1
>
> If its shape is provided, how might we reconstruct the original array?
>
> [For the sake of simple code, it's ok to focus on numeric, rank 2 arrays.]
>
> --
> Raul
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to