2013-11-28 16:47:57 +01:00
|
|
|
#ifndef INDEX_SEARCHER_HDR
|
|
|
|
#define INDEX_SEARCHER_HDR
|
|
|
|
|
|
|
|
#include <boost/shared_ptr.hpp>
|
|
|
|
#include <fstream>
|
|
|
|
#include <iostream>
|
|
|
|
|
2013-12-06 22:29:25 +01:00
|
|
|
#include "concordia/common/config.hpp"
|
2013-11-29 16:19:49 +01:00
|
|
|
#include "build/libdivsufsort/include/divsufsort.h"
|
2013-11-28 16:47:57 +01:00
|
|
|
#include "concordia/hash_generator.hpp"
|
|
|
|
#include "concordia/concordia_exception.hpp"
|
|
|
|
|
|
|
|
/*!
|
|
|
|
Class for searching the index with a sentence.
|
|
|
|
|
|
|
|
*/
|
|
|
|
|
|
|
|
using namespace std;
|
|
|
|
|
|
|
|
class IndexSearcher {
|
|
|
|
public:
|
|
|
|
explicit IndexSearcher();
|
|
|
|
|
|
|
|
/*! Destructor.
|
|
|
|
*/
|
|
|
|
virtual ~IndexSearcher();
|
|
|
|
|
2013-12-14 15:23:17 +01:00
|
|
|
boost::shared_ptr<vector<saidx_t> > simpleSearch(
|
|
|
|
boost::shared_ptr<HashGenerator> hashGenerator,
|
|
|
|
boost::shared_ptr<std::vector<sauchar_t> > T,
|
|
|
|
boost::shared_ptr<std::vector<saidx_t> > SA,
|
|
|
|
const string & pattern) throw(ConcordiaException);
|
2013-11-28 16:47:57 +01:00
|
|
|
private:
|
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|