Re: [Jprogramming] Graph Multiplication in J

2013-04-18 Thread Raul Miller
On Wed, Apr 17, 2013 at 11:13 PM, Michal D. wrote: >> I'd want to >> understand why you've used "0 1 in its definition - do you really >> support vector left arguments? > > I'm not sure what you mean - what kind of rank would you like to see? "1 would be slightly more concise than "0 1 (for examp

Re: [Jprogramming] Graph Multiplication in J

2013-04-17 Thread Michal D.
> > In rep_ravel (which should be defined using =: rather than =. unless > you fix (f.) the definition of rep) you can replace > Good call, thanks for spotting this. > > #&0@:(1&{)@:$@:] > > with > > 0 * {.@] > I was thinking of something along these lines but thought there would be problems wi

Re: [Jprogramming] Graph Multiplication in J

2013-04-17 Thread Raul Miller
In rep_ravel (which should be defined using =: rather than =. unless you fix (f.) the definition of rep) you can replace #&0@:(1&{)@:$@:] with 0 * {.@] You can also simplify rep_stride I imagine (and it should also be defined using =:) but before I think about that, I'd want to understand why y

[Jprogramming] Graph Multiplication in J

2013-04-16 Thread Michal D.
Hi All, I've been exploring Spectral Graph Theory recently ( http://www.cs.yale.edu/homes/spielman/561/) and thought I'd try my hand at implementing graph multiplication in J. It came out quite well. I wish the 'rep' definition for repeating matrices on a diagonal was shorter. Here's the code i