strus  0.17
termStatistics.hpp
Go to the documentation of this file.
1 /*
2  * Copyright (c) 2014 Patrick P. Frey
3  *
4  * This Source Code Form is subject to the terms of the Mozilla Public
5  * License, v. 2.0. If a copy of the MPL was not distributed with this
6  * file, You can obtain one at http://mozilla.org/MPL/2.0/.
7  */
8 #ifndef _STRUS_TERM_STATISTICS_HPP_INCLUDED
9 #define _STRUS_TERM_STATISTICS_HPP_INCLUDED
10 #include "strus/index.hpp"
11 
12 namespace strus {
13 
17 {
18 public:
21  :m_df(-1){}
24  :m_df(df_){}
27  :m_df(o.m_df){}
28 
31  GlobalCounter documentFrequency() const {return m_df;}
32 
35  void setDocumentFrequency( const GlobalCounter& df_) {m_df = df_;}
36 
37 private:
38  GlobalCounter m_df;
39 };
40 
41 }//namespace
42 #endif
43 
44 
GlobalCounter documentFrequency() const
Get the global document frequency.
Definition: termStatistics.hpp:31
TermStatistics(const GlobalCounter &df_)
Constructor.
Definition: termStatistics.hpp:23
Numeric types used for local and global indices.
void setDocumentFrequency(const GlobalCounter &df_)
Set the global document frequency to use for the associated term.
Definition: termStatistics.hpp:35
TermStatistics()
Constructor.
Definition: termStatistics.hpp:20
TermStatistics(const TermStatistics &o)
Copy constructor.
Definition: termStatistics.hpp:26
Global term statistics, if passed down with the query.
Definition: termStatistics.hpp:16
int64_t GlobalCounter
Number type generally used for indices globally shared between different instances of strus...
Definition: index.hpp:32