shawn857
asked on
What is unit "Generics.Collections" ?
hello, I've found a Delphi unit for implementing the AhoCorasick string search algorithm on this site:
https://gist.github.com/madhurjain/10067345
... but it makes a call to a unit "Generics.Collections" that my Delphi 7 compiler doesn't like ("File not found : "Generics.Collections.dcu" ). Is this because my Delphi 7 is too old? Is there a workaround...?
Thanks!
Shawn
https://gist.github.com/madhurjain/10067345
... but it makes a call to a unit "Generics.Collections" that my Delphi 7 compiler doesn't like ("File not found : "Generics.Collections.dcu"
Thanks!
Shawn
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
No, it is not good to put this file - because it is compiled with another version of Delphi and needs compatible units. Workaroud is to try to make unit compatible to older Delphi. If you get stuck - ask for help here.
Add: Similar search algorithm: Boyer-Moore-Horspool
Add: Similar search algorithm: Boyer-Moore-Horspool
ASKER
OK thank you Sinisa. I think mainly what I need from the Generics.Collections unit is the Queue and Stack capability. Do you know if there's maybe a 3rd party implementation of these data structures for D7?
Also regarding the Boyer-Moore-Horspool method - I looked at that one already and it's not suitable for me as it searches for only one pattern in the target string. I need to be able to search for multiple patterns in the target string.
Thanks!
Shawn
Also regarding the Boyer-Moore-Horspool method - I looked at that one already and it's not suitable for me as it searches for only one pattern in the target string. I need to be able to search for multiple patterns in the target string.
Thanks!
Shawn
Queue and Stack do exists in D7 iirc, but not a generic queue and stack.
Generics is a mechanism which the compiler needs to support, you can not build or use it if it's not in the compiler, read this for more information.
Generics is a mechanism which the compiler needs to support, you can not build or use it if it's not in the compiler, read this for more information.
there is a queue and stack type in the contnrs unit.
ASKER
what is the difference between the "generic" queue and stack, and the queue and stack found in D7's contnrs unit?
Thanks
Shawn
Thanks
Shawn
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks
Shawn