Re: bit pattern matching
- Posted by "Kat" <gertie at visionsix.com> May 27, 2004
- 504 views
On 27 May 2004, at 2:18, Kat wrote: > > > On 26 May 2004, at 23:42, Allen Robnett wrote: > > > > > From: "Ricardo M. Forno" <rforno at uyuyuy.com> > > Subject: RE: bit manipulation > > > > > > <<If you are searching for an exact match (lets say 100110010), and you have > > it in a character string (a sequence), you migth try this:>> > > > > The matching that I want to do is probably a little unusual. > > First I want to align the most significant bits of the two samples. > > Then I want to determine the number of bits that match, up to the first > > mismatch, but not beyond. The ratio of the number of matching bits to the > > length of the primary sample should be a useful measure of the degree of > > match. > > Oh, then you want to search email records for DCuny's difference code, > which i asked for some 4 or 5 yrs ago. It's a great starting point for > tweaking > to your specific application of this sort. It works as he submitted it to the > email list, but never made it to the user contribs page, afaik. I looked for > it > here for an hour, since i did significant tweaking, speed tests, and > verification tests for data loss, but i'm afraid since no one was interested > back then, that's some of the code i deleted. Tiggr had a copy squirreled away, being a kat, i found it anyhow. You want wrdcomp.e by David Cuny. There's lapses in the comparisons for nested inequalities, which i'll call "features", in it's operation. Fixing them to locate *all* possible resync points in nested sentences or databases takes 2x as much code and way, way more cpu time. You'll want to delete duplicate re- sync points *before* wasting time re-searching nested differences between sequences/words. Case sensitivity shouldn't be a problem for your bits tho. Kat > Look up similarity.e by R. M. Forno too. > > Kat > > > >