just an idea (untested) using iterations
1. starting from left (or right as Linda)
2. find the first (innermost) matched pair
3. eliminate the pair
4. repeat from 1 until no more match.
rremaining parentheses are umatched ones.
On 28 Dec, 2016 12:54 pm, "Raul Miller" wrote:
> I'm not sure if i
Thank you - following this discussion has helped me a lot! Also I didn't
look into NuVoc til now but rather limited myself to the old vocabulary
simply because it is included in the installation.
Ehm, since I mentioned it, here's my AoC 9 part I. Of course this does not
use u} at all - that part g
Note that linear indexes are mathematically equivalent to boxed
indexes base (#.) array shape.
The problem, though, is that they are atom indices, and not frame indices.
--
Raul
On Wed, Dec 28, 2016 at 12:56 PM, Brian Schott wrote:
> To clarify NuVoc's explanation, first I think I created the
To clarify NuVoc's explanation, first I think I created the index list for
the current example.
,/>@{(i. 3);i. 2
0 0
0 1
1 0
1 1
2 0
2 1
Then pretending that y is i. 3 2, I applied the expression given in NuVoc
and it produces the expected "atom numbers".
($i. 3 2)#. ,/>@{(i. 3);i. 2
0 1 2
The Dictionary does discuss this, at
http://www.jsoftware.com/help/dictionary/d530v.htm but unfortunately it
doesn't mention that the result of u is the atom number.
NuVoc in http://code.jsoftware.com/wiki/Vocabulary/curlyrtu#dyadic does
describe the case correctly, though without the usual ex
IIRC amend at that time used "linear index".
x m} y is ($y) x m} ,y
Ср, 28 дек 2016, Cliff Reiter написал(а):
> A long, long, time ago in a J far away, indexing was done in i. order. So
> indices to a 3 by 2 array would be given by
> i.3 2
>
> 0 1
>
> 2 3
>
> 4 5
>
> Is it possible t
I played with x u}y some more. It seems that y is treated as a vector (rank
1) no matter what rank it actually is. x and u must be either rank 0 or 1
and both the same. Also then number of items in x must match the number of
items produced by u. Not sure what is going on. but it does not seem to
wo
A long, long, time ago in a J far away, indexing was done in i. order.
So indices to a 3 by 2 array would be given by
i.3 2
0 1
2 3
4 5
Is it possible that x u}y is an artifact from that era?
On 12/27/2016 3:06 PM, Don Guinn wrote:
Just played with the original expression a little a
Here's the start of an idea:
First test if they match or don't match:
D=:'((())())'
[L=:'('=D
1 1 1 0 0 1 0 0
[R=:')'=E
0 0 1 1 0 0 0 1 1
0=(+/L)-+/R
1
E=:'(())((())'
[L=:'('=E
1 1 0 0 1 1 1 0 0
[R=:')'=E
0 0 1 1 0 0 0 1 1
0=(+/L)-+/R
0
Since E is unmat