Yes, definitely.
For example, consider:
<"1 ({:"1 (+&.>/@:({."1), (<0 1){])/. ])>v1
Or,
f=: 13 :'<"1 ({:"1 (+&.>/@:({."1), (<0 1){])/. ])>y'
f v1
That said, this example may fall apart for your general case? (I don't
know what that is...)
Specifically, I don't know why the top level structure of v1 and v2
would be a list of boxed entities if they are always pairs. It seems
to me that a table of two columns would be a more natural expression
of that, if that's the case.
Thanks,
--
Raul
On Mon, Nov 25, 2019 at 11:12 AM Arnab Chakraborty <[email protected]> wrote:
>
> Dear all,
>
> I am trying to implement a geometric algebra system in J. I have done
> much of the stuff, but is getting stuck at one point. Hence this email.
>
> Basically, I have a list of boxes like
>
> v1=: (<2.3; 2 3 4), (<3.9; 1 2), <3.1; 2 3 4
>
> This represents a (multi)vector whose math representation is
>
> 2.3 * e_{234} + 3.9 * e_{12} + 3.1 * e_{234}.
>
> Here the e_{...}'s are some basis vectors. As you can see, e_{234} occurs
> twice in the list, and so this vector may be reduced to
>
> 5.4 * e_{234} + 3.9 * e_{12}.
>
> In J this should be
>
> v2=:(<5.4; 2 3 4), <3.9; 1 2
>
> I want to write a monad f such that f v1 is v2.
>
> Any idea?
>
> Thanks and regards.
>
> Arnab.
> ----------------------------------------------------------------------
> For information about J forums see http://www.jsoftware.com/forums.htm
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm