It is a simple slip. T is, in the NOTE:
0 0
0 1
0 1
1 1
And (let us call it Tlocs):
]Tlocs=:Gloc L:0 (0;1)=L:0 T
┌─────┬─────┐
│0 0 0│0 1 1│
│0 0 1│1 0 1│
│0 1 0│1 1 0│
│1 0 0│1 1 1│
└─────┴─────┘
If you then do the |. on the second item of Tlocs:
(0{Tlocs),|.L:0 (1{Tlocs)
┌─────┬─────┐
│0 0 0│1 1 1│
│0 0 1│1 1 0│
│0 1 0│1 0 1│
│1 0 0│0 1 1│
└─────┴─────┘
You have the result you want.
(I should mention that Gloc is meant to apply to
arrays of 0 and 1. I should really have defined
it as, perhaps, ($ #: I.@,)@:*
Best wishes, N.
On 2019.08.19 09:52:02, you,
the extraordinary R.E. Boss, spake thus:
> I tried to understand what you wrote and am left with questions.
>
> Take
> [T=:(0 1 1, 1 0 1, 1 1 0,:1 1 1);0 0 0,0 0 1,0 1 0,:1 0 0
> +-----+-----+
> |0 1 1|0 0 0|
> |1 0 1|0 0 1|
> |1 1 0|0 1 0|
> |1 1 1|1 0 0|
> +-----+-----+
>
> With Gloc=: $ #: I.@, from the Journal of J, I get
> Gloc L:0 (0;1)=L:0 T
> +---+---+
> |0 0|1 2|
> |1 1|2 1|
> |2 2|3 0|
> +---+---+
> From this I get
> (, (>:@$|"1 -.)L:0,:~-.L:0)Gloc L:0 (0;1)=L:0 T
> +-----+-----+
> |0 0 |1 2 |
> |1 1 |2 1 |
> |2 2 |3 0 |
> +-----+-----+
> | 1 1| 0 _1|
> | 0 0|_1 0|
> |_1 _1|_2 1|
> +-----+-----+
> |1 1 |0 2 |
> |0 0 |3 0 |
> |3 2 |2 1 |
> +-----+-----+
> Which are the original locations of 0 and 1 respectively, there negations
> (-.), and these converted to locations.
> Being selfdual we should have the first and the reversed latest row to be
> equal, however
> (-: [:|. (>:@$|"1 -.)L:0)Gloc L:0 (0;1)=L:0 T
> 0
>
> What do I do wrong?
>
>
> R.E. Boss
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm