[PD] Counting many many matches

Claude Heiland-Allen claudiusmaximus at goto10.org
Thu Feb 23 19:45:22 CET 2006


Something using one table as a counter might work:

  |
[t a a]
"$1" "$2"
  |   [* N]  // first number is in 0..N-1
[+     ]
[t f f]
[tabread $0-table]
  |   [+ 1]
[tabwrite $0-table]

(note: untested, may have some syntax errors...)


B. Bogart wrote:
> Hey all,
> 
> I'd like to know a method for counting the number of times a particular
> message is received. I could use route, but I'm talking about 1000s of
> messages. The messages would look something like:
> 
> 320 240 blah blah
> 
> So I would like this message to add a counter to the bin that
> corresponds to "320 240" This would be a seperate bin to say:
> 
> 319 240 blah blah
> 
> So I could have as many as 76,800 different bins...
> 
> I would do this in python with a big numarray, but wanted to hear
> suggestions for other approaches.
> 
> Thanks all!
> 
> .b.
> 
> 
> ------------------------------------------------------------------------
> 
> _______________________________________________
> PD-list at iem.at mailing list
> UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list





More information about the Pd-list mailing list