|
-
Dec 4th, 2002, 10:09 PM
#1
Thread Starter
transcendental analytic
stl map search problem
i have a map of key type string, but i have to search for the key with the longest possible string that matches a substring starting from a specific position in an input string. ex 0 in this:
"++c;"
matches the substring "++" that is found in the map even if there is a "+" in the map.
Will searching (lower bound) for the whole input string "++c;" be efficient even if it would be of size of several megabytes? I don't want the string to be copied or iterated more than nessesary, and this have to work with any substring of the input string. Would i have to make fake container that simulates a string but is actually a reference to a substring in the input string?
Use  
writing software in C++ is like driving rivets into steel beam with a toothpick.
writing haskell makes your life easier:
reverse (p (6*9)) where p x|x==0=""|True=chr (48+z): p y where (y,z)=divMod x 13
To throw away OOP for low level languages is myopia, to keep OOP is hyperopia. To throw away OOP for a high level language is insight.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|