On Wed, Mar 23, 2011 at 1:30 PM, I wrote:
>  ((] ; 0.5 * */&>/@(-:@+&.> io)~ + (+
> random&([smoutput&<))@-:@weights@[) (weights combiningFn
> nextPair@outputs)) seed

Though that was all on one line when I wrote it.

But I should probably explain this bit:

   */&>/@(...)

The parenthesized expression is a hook that produces a two element
list of boxes.  (Each box contains a two element list of numbers).
So, anyways *&>/ gets applied to the whole of the result produced by
that hook.

Thus, this might be equivalent to:
   */&>/  1 _1;0 1

The expression v/ noun is equivalent to an expression with v between
each of the items of the noun.  In this case, that would be:
   (<1 _1) */&> (<0 1)

(I left have a set of redundant parenthesis there for symmetry, and to
favor people not comfortable with J.)

An expression of the form m u&v n is (ignoring rank issues) equivalent
to (v m) u (v n) which means, here:
   (><1 _1) */ (><0 1)
or
   1 _1 */ 0 1

Now, when you use a / verb in a dyadic context it's different from
what it means in a monadic context.  In essence, this is a times
table:

   1 _1 */ 0 1
0  1
0 _1

I am not sure if I need to go into the mechanics of how */ works but
the short form is: it's showing all possible results from the two
different left arguments combined with the two different right
arguments.

I hope this helps,

-- 
Raul
----------------------------------------------------------------------
For information about J forums see http://www.jsoftware.com/forums.htm

Reply via email to