Answered by:
Search Pattern!

Question
-
Answers
-
Hi,
the meaning of Search Pattern depends on the context. The context could be string matching, information retrieval, or something else.
Information Retrieval: http://searchpatterns.org/
String matching:
- http://en.wikipedia.org/wiki/String_searching_algorithm
- http://www.dotnetperls.com/boyer-moore
- http://jamesmccaffrey.wordpress.com/2012/08/18/the-knuth-morris-pratt-string-search-algorithm-in-c/
- http://www.codeproject.com/Articles/12383/Aho-Corasick-string-matching-in-C
- ...
Something else: ???
Best regards,
Chris
Code Samples: Code Samples
Chrigas Blog: Chrigas Blog
All replies
-
Hi there
Last time I heard about trees or such things as tree traversal, search algorithms etc. was at uni, and that quite a long time ago ;)
I bet you could create a tree or implement your own search algorithm, maybe this helps you to get started: http://stackoverflow.com/questions/66893/tree-data-structure-in-c-sharp
As for me, I normally end up using Linq or Lambda expressions to search collections.
using System.Linq; static void test(List<Employee> employees) { // Linq syntax IEnumerable<Employee> test1 = from Employee e in employees where e.FirstName == "Stephan" select e; // Lambda expression (returns the same as test1) IEnumerable<Employee> test2 = employees.Where(e => e.FirstName == "Stephan"); Employee test3 = employees.FirstOrDefault(e => e.EmployeeNumber == 1056); }
-
-
Hi,
the meaning of Search Pattern depends on the context. The context could be string matching, information retrieval, or something else.
Information Retrieval: http://searchpatterns.org/
String matching:
- http://en.wikipedia.org/wiki/String_searching_algorithm
- http://www.dotnetperls.com/boyer-moore
- http://jamesmccaffrey.wordpress.com/2012/08/18/the-knuth-morris-pratt-string-search-algorithm-in-c/
- http://www.codeproject.com/Articles/12383/Aho-Corasick-string-matching-in-C
- ...
Something else: ???
Best regards,
Chris
Code Samples: Code Samples
Chrigas Blog: Chrigas Blog