strus  0.17
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
7  */
12 #include "strus/index.hpp"
14 #include <vector>
15 #include <string>
17 namespace strus
18 {
22 {
23 public:
27  SummarizationVariable( const std::string& name_, PostingIteratorInterface* itr_)
28  :m_name(name_),m_itr(itr_){}
32  :m_name(o.m_name),m_itr(o.m_itr){}
35  const std::string& name() const {return m_name;}
38  Index position() const {return m_itr->posno();}
42  const PostingIteratorInterface* itr() const {return m_itr;}
44 private:
45  std::string m_name;
47 };
49 }//namespace
50 #endif
int32_t Index
Number type generally used for locally counted indices.
Definition: index.hpp:29
SummarizationVariable(const std::string &name_, PostingIteratorInterface *itr_)
Definition: summarizationVariable.hpp:27
Numeric types used for local and global indices.
Interface for an iterator on postings (pairs of (d,p) where d is the document number and p the positi...
virtual Index posno() const =0
Get the current position number.
SummarizationVariable(const SummarizationVariable &o)
Copy constructor.
Definition: summarizationVariable.hpp:31
Structure that represents a set of feature occurrencies (postings) as iterator.
Definition: postingIteratorInterface.hpp:20
const std::string & name() const
Name of the variable.
Definition: summarizationVariable.hpp:35
Index position() const
Feature occurrence attached to this variable at the current position of the summarizer feature postin...
Definition: summarizationVariable.hpp:38
const PostingIteratorInterface * itr() const
Posting iterator of the variable.
Definition: summarizationVariable.hpp:42
Structure describing a variable referencing a named match of a subexpression. Variables are attached ...
Definition: summarizationVariable.hpp:21