POV-Ray : Newsgroups : povray.off-topic : An interesting problem : An interesting problem Server Time
28 Jul 2024 18:22:18 EDT (-0400)
  An interesting problem  
From: Orchid Win7 v1
Date: 24 Apr 2013 03:51:34
Message: <51778f06$1@news.povray.org>
OK, so here's an interesting thought...

I've been looking at string searching algorithms, and regular 
expressions, and generally at pattern matching on data. There are lots 
of ideas about how to find a specific pattern as fast as possible. But 
what I don't see anywhere is how to look for *several* patterns and see 
which one is present. (Especially patterns occurring [or not] at a 
specific location.)

If I'm looking at some data which will contain one of 1,000 possible 
patterns, it sounds like it would be quite inefficient to run 1,000 
different checks on it. I suppose I could try building a decision tree, 
but if most of the patterns are at least half a dozen bytes long, 
there's a danger that tree could become really, really big.

Anyone have any other suggestions?


Post a reply to this message

Copyright 2003-2023 Persistence of Vision Raytracer Pty. Ltd.