Now I see that you have shown the correct calculation in J using verb
flip and conjunction dotcj. I used  power in my formulation to
emphasize the interleaving. But by doing so I may have computed all
products first. Are you suggesting that not all products in the inner
product are calculated first, but only as needed for the accumulation
(+/)?

Also, I see that dotcj produces a dyadic hook in an explicit
definition. Very slick.

On Tue, Jun 9, 2009 at 2:17 PM, Brian Schott<[email protected]> wrote:
> Thanks, Roger. So does the following computation reflect the order of
> calculation in row-at-a-time g"_1 before the f/ (that's a J /) ?
>
>   10 100 1000 <@:*"_1  i.3 4
> +----------+---------------+---------------------+
> |0 10 20 30|400 500 600 700|8000 9000 10000 11000|
> +----------+---------------+---------------------+
>
> And does the following calculation reflect row-at-a-time inner product
> with a sort of interleaving?
>   (+/@(2&{.),(2&}.))^:_]10 100 1000 (*"_1)  i.3 4
> 8400 9510 10620 11730
>
>
>
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to