Re: [9fans] rows to cols?

2009-11-14 Thread Lyndon Nerenberg (VE6BBM/VE7TFX)
> i haven't found avl to be slow, so i was interested in > this. It was slow in relation to other methods available. That code wasn't written to be fast. It came out of a long ago Sunday afternoon discussion I had with someone about data structures, from which we ended up cobbling together a few

Re: [9fans] rows to cols?

2009-11-14 Thread erik quanstrom
> It's dog slow (actually, avl(2) is), but its effectively > unbounded for the input dataset size. i haven't found avl to be slow, so i was interested in this. after stripping out the tmp file and the unnecessary runes, prof tells me this for a 2000x1 array. (normal runtime ~20s) minooka; p

Re: [9fans] bio(2) and ORDWR

2009-11-14 Thread Sam Watkins
On Sat, Nov 14, 2009 at 01:33:37PM +1100, Bruce Ellis wrote: > Contact me off list and I'll explain it. I'd rather like to know why too, if you can post the reason to the list. Sam

Re: [9fans] rows to cols?

2009-11-14 Thread dave . l
It's the sort of thing I used to give as an exercise to students. Wish I'd been in your class. Explicit looping looks so strenuous. I know: I kept thinking "map ... join": too much perl. To make the tr|pr method more general, you can count columns first with But that's multi-pass:-). Y

[9fans] Its not Venti...

2009-11-14 Thread Venkatesh Srinivas
http://www.peereboom.us/epitome/ -- vs

Re: [9fans] rows to cols?

2009-11-14 Thread Richard Miller
> Wow. > Excellent us of tools. It's the sort of thing I used to give as an exercise to students. > The smallest arbitrary-columns answer I could come up with was: > awk '{if(m < NF)m=NF;for(i=1;i<=NF;i++)r[NR, i]=$i}END {for(i=1;i<=m;i+ > +){for(j=1;j<=NR;j++)printf "%s ", r[j,i];print ""}}' t