common/expand.h

Go to the documentation of this file.
00001 /* expand.h: class for finding expand terms
00002  *
00003  * Copyright 1999,2000,2001 BrightStation PLC
00004  * Copyright 2002,2003,2007 Olly Betts
00005  *
00006  * This program is free software; you can redistribute it and/or
00007  * modify it under the terms of the GNU General Public License as
00008  * published by the Free Software Foundation; either version 2 of the
00009  * License, or (at your option) any later version.
00010  *
00011  * This program is distributed in the hope that it will be useful,
00012  * but WITHOUT ANY WARRANTY; without even the implied warranty of
00013  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
00014  * GNU General Public License for more details.
00015  *
00016  * You should have received a copy of the GNU General Public License
00017  * along with this program; if not, write to the Free Software
00018  * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301
00019  * USA
00020  */
00021 
00022 #ifndef OM_HGUARD_EXPAND_H
00023 #define OM_HGUARD_EXPAND_H
00024 
00025 #include "database.h"
00026 #include "termlist.h"
00027 #include <xapian/enquire.h>
00028 
00029 #include <queue>
00030 #include <stack>
00031 #include <vector>
00032 #include "autoptr.h"
00033 
00034 class RSetI;
00035 
00037 class OmExpand {
00038     private:
00039         // disallow copy
00040         OmExpand(const OmExpand &);
00041         void operator=(const OmExpand &);
00042 
00043         const Xapian::Database &db;
00044 
00045         bool recalculate_maxweight;
00046         AutoPtr<TermList> build_tree(const RSetI *rset);
00047 
00048     public:
00049         OmExpand(const Xapian::Database &db_);
00050 
00051         void expand(Xapian::termcount max_esize,
00052                     Xapian::ESet & eset,
00053                     const RSetI * rset,
00054                     const Xapian::ExpandDecider * decider,
00055                     bool use_exact_termfreq,
00056                     double expand_k);
00057 };
00058 
00059 inline OmExpand::OmExpand(const Xapian::Database &db_) : db(db_)
00060 {
00061 }
00062 
00063 #endif /* OM_HGUARD_EXPAND_H */

Documentation for Xapian (version 1.0.10).
Generated on 24 Dec 2008 by Doxygen 1.5.2.