Lolly 1.4.27
Loading...
Searching...
No Matches
fast_search.hpp
Go to the documentation of this file.
1
2/******************************************************************************
3 * MODULE : fast_search.hpp
4 * DESCRIPTION: Fast multiple searches in same string
5 * COPYRIGHT : (C) 2014 Joris van der Hoeven
6 *******************************************************************************
7 * This software falls under the GNU general public license version 3 or later.
8 * It comes WITHOUT ANY WARRANTY WHATSOEVER. For details, see the file LICENSE
9 * in the root directory or <http://www.gnu.org/licenses/gpl-3.0.html>.
10 ******************************************************************************/
11
12#include "array.hpp"
13#include "hashmap.hpp"
14#include "string.hpp"
15
16#ifndef FAST_SEARCH_H
17#define FAST_SEARCH_H
18
19class string_searcher;
21 string s;
23 array<int> search_sub (string what);
24
25public:
26 string_searcher_rep (string s);
27 string get_string ();
28 int search_next (string what, int pos);
29 array<int> search_all (string what);
30 friend class string_searcher;
31 friend void get_longest_common (string s1, string s2, int& b1, int& e1,
32 int& b2, int& e2);
33};
34
41
42void get_longest_common (string s1, string s2, int& b1, int& e1, int& b2,
43 int& e2);
44
45#endif // FAST_SEARCH_H
blackbox b1
blackbox b2
#define CONCRETE_CODE(PTR)
Macro used to define the implementation of a concrete smart pointer.
Definition classdef.hpp:159
The list class represents a linked list.
Definition list.hpp:48
friend void get_longest_common(string s1, string s2, int &b1, int &e1, int &b2, int &e2)
int search_next(string what, int pos)
array< int > search_all(string what)
array< int > search_sub(string what)
array< hashmap< int, array< int > > > a
string_searcher_rep(string s)
string_searcher(string s)
CONCRETE(string_searcher)
C * tm_new()
void get_longest_common(string s1, string s2, int &b1, int &e1, int &b2, int &e2)
Structure representing a concrete object with a reference count.
Definition classdef.hpp:24
base class of resources
Definition resource.hpp:23