Re: [Jprogramming] Generate Complete Graphs

2015-09-27 Thread David Lambert
Recalling the essays, this is the non-increasing odometer problem http://www.jsoftware.com/jwiki/Essays/Nonincreasing%20Odometer I enjoyed the original solutions. Subject: [Jprogramming] Generate Complete Graphs >>>To: "Programming Forum" >>>Date: Saturda

Re: [Jprogramming] Generate Complete Graphs

2015-09-27 Thread Linda A Alvord
Henry Rich < <mailto:henryhr...@gmail.com> henryhr...@gmail.com> wrote: Subject: Re: [Jprogramming] Generate Complete Graphs To: <mailto:programm...@jsoftware.com> programm...@jsoftware.com Date: Sunday, September 27, 2015, 11:21 AM Yes, that's very pretty. Henry Rich On 9/

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread 'Jon Hough' via Programming
3 > 2 4 > 3 4 > > -Original Message- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller > Sent: Saturday, September 26, 2015 6:52 PM > To: Programming forum > Subject: Re: [

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Henry Rich
Yes, that's very pretty. Henry Rich On 9/26/2015 10:08 PM, Linda A Alvord wrote: Or: 5 5#:I.,mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Saturday, September 26, 2015 6:52 PM To: Programming forum Subject: Re: [Jprogramming] Generate Complete Graphs An

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Linda A Alvord
Or: 5 5#:I.,mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Raul Miller Sent: Saturday, September 26, 2015 6:52 PM To: Programming forum Subject: Re: [Jprogramming] Generate Complete Graphs Another variation might be: require'stats' complete=: 2&comb That s

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Raul Miller
[: #: [: i. 2 ^ ] > > Linda > > -Original Message- > From: programming-boun...@forums.jsoftware.com > [mailto:programming-boun...@forums.jsoftware.com] On Behalf Of Linda A > Alvord > Sent: Saturday, September 26, 2015 11:48 AM > To: programm...@jsoftware.com >

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Linda A Alvord
a A Alvord Sent: Saturday, September 26, 2015 11:48 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Generate Complete Graphs comb=: 13 :'(x=+/"1 #:i.2^y) ([:|.[:I.#) #:i.2^y' 2 comb 5 0 1 0 2 0 3 0 4 1 2 1 3 1 4 2 3 2 4 3 4 3 comb 4 0 1 2 0 1 3 0 2 3 1 2 3 -

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread R.E. Boss
rums.jsoftware.com [mailto:programming- > boun...@forums.jsoftware.com] On Behalf Of Linda A Alvord > Sent: zaterdag 26 september 2015 17:48 > To: programm...@jsoftware.com > Subject: Re: [Jprogramming] Generate Complete Graphs > > comb=: 13 :'(x=+/"1 #:i.2^y) ([:|.[:I.#) #:

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread 'Jon Hough' via Programming
nda A Alvord wrote: Subject: Re: [Jprogramming] Generate Complete Graphs To: programm...@jsoftware.com Date: Sunday, September 27, 2015, 12:47 AM comb=: 13 :'(x=+/"1 #:i.2^y) ([:|.[:I.#) #:i.2^y'    2 comb 5 0 1 0 2 0 3 0 4 1 2 1 3 1 4 2 3 2 4 3 4        3 comb 4

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Linda A Alvord
f Of Henry Rich Sent: Saturday, September 26, 2015 11:12 AM To: programm...@jsoftware.com Subject: Re: [Jprogramming] Generate Complete Graphs ; <@({. ,. }.)\.@i. 5 (#~ Sorry, the second verb should be > > getEdges =: 3 : 0 > if. 1 > # y do. > > else. > h =. 1{.y >

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread Henry Rich
7; via Programming wrote: Subject: [Jprogramming] Generate Complete Graphs To: "Programming Forum" Date: Saturday, September 26, 2015, 10:16 PM I have a couple of verbs to represent a complete (undirected) graph as a list of edges. Clearly there are "N choose 2" edges

Re: [Jprogramming] Generate Complete Graphs

2015-09-26 Thread 'Jon Hough' via Programming
Sorry, the second verb should be getEdges =: 3 : 0 if. 1 > # y do. else. h =. 1{.y t =. 1}.y ((h&,)"0 t ), getEdges t end. ) (changed getNodes to getEdges) On Sat, 9/26/15, 'Jon Hough' via Programming wrote: Subject: [

[Jprogramming] Generate Complete Graphs

2015-09-26 Thread 'Jon Hough' via Programming
I have a couple of verbs to represent a complete (undirected) graph as a list of edges. Clearly there are "N choose 2" edges that need to be generated. This is my code complete =: 3 : 0 nodes =. i. y getEdges nodes ) getEdges =: 3 : 0 if. 1 > # y do. else. h =. 1{.y t =. 1}.y ((h&,)"0 t ), get