if you use [drip] from zexy, you can build a patch with [simile] from my ekext externals.

Alternatively, you could turn the problem on its head. Feed the list into [sieve] via [drip] into a [set $1 1( message, run sieve in mode 1 (nearest value), and fire the value (rather than the list) into sieve each time the list is updated. [sieve] is also part of the ekext externals.

When I get my [listmatch] object finished I'll let you know, but I'm quite busy right now!

Best,
Ed

danja <binary.koala@gmail.com> wrote:
hello there,
i have a [list] of numbers and i'd like to search through it for the
value closest to the search subject. so to say, if i have '22 31 47 86'
in my list and i match it with '45' the answer would be '47' (closest in
the list). this rather useful function (fuzzy integer search?) must have
been written by someone already, it's just that i can't find it :)
i wouldn't ask if i could patch it myself, but i know how it might work:
all integers from the list are compared to the reference (subject)
number, and the integer in subtraction closest to '0' would be the
hit... you know what i mean?

any advice is very much appreciated!

p.s. apologies for my ignorance, i'm just starting here...

--
danja
http://k0a1a.net

_______________________________________________
PD-list@iem.at mailing list
UNSUBSCRIBE and account-management -> http://lists.puredata.info/listinfo/pd-list



Lone Shark "Aviation" out now on http://www.pyramidtransmissions.com
http://www.myspace.com/sharktracks


Yahoo! Answers - Get better answers from someone who knows. Try it now.