JASSv2
Public Member Functions | Static Public Member Functions | List of all members
JASS::quantize_none< RANKER > Class Template Reference

Do not quantize the in-memory index (i.e. generate a tf-ordered index) More...

#include <quantize_none.h>

Inheritance diagram for JASS::quantize_none< RANKER >:
Inheritance graph
[legend]
Collaboration diagram for JASS::quantize_none< RANKER >:
Collaboration graph
[legend]

Public Member Functions

 quantize_none (size_t documents, std::shared_ptr< RANKER > ranker)
 Constructor. More...
 
virtual ~quantize_none ()
 Destructor.
 
virtual void operator() (const slice &term, const index_postings &postings, compress_integer::integer document_frequency, compress_integer::integer *document_ids, index_postings_impact::impact_type *term_frequencies)
 The callback function for each postings list is operator(). More...
 
virtual void operator() (index_manager::delegate &writer, const slice &term, const index_postings &postings, compress_integer::integer document_frequency, compress_integer::integer *document_ids, index_postings_impact::impact_type *term_frequencies)
 The callback function for each postings list is operator(). More...
 
virtual void operator() (index_manager::delegate &writer, size_t document_id, const slice &primary_key)
 The callback function for primary keys (external document ids) is operator(). Not needed for quantization. More...
 
- Public Member Functions inherited from JASS::quantize< RANKER >
 quantize (size_t documents, std::shared_ptr< RANKER > ranker)
 Constructor. More...
 
virtual ~quantize ()
 Destructor.
 
virtual void finish (void)
 Do any final cleaning up.
 
virtual void operator() (size_t document_id, const slice &primary_key)
 The callback function for primary keys (external document ids) is operator(). Not needed for quantization. More...
 
void get_bounds (double &smallest, double &largest)
 Get the smallest and largest term / document influence (should be called after the first round of the quantizer). More...
 
void serialise_index (index_manager &index, std::vector< std::unique_ptr< index_manager::delegate >> &serialisers)
 Given the index and a serialiser, serialise the index to disk. More...
 
- Public Member Functions inherited from JASS::index_manager::delegate
 delegate (size_t documents)
 Destructor.
 
virtual ~delegate ()
 Destructor.
 
- Public Member Functions inherited from JASS::index_manager::quantizing_delegate
virtual ~quantizing_delegate ()
 Destructor.
 

Static Public Member Functions

static void unittest (void)
 Unit test this class.
 
- Static Public Member Functions inherited from JASS::quantize< RANKER >
static void unittest (void)
 Unit test this class.
 

Additional Inherited Members

- Public Attributes inherited from JASS::index_manager::delegate
size_t documents
 The number of documents in the collection.
 

Detailed Description

template<typename RANKER>
class JASS::quantize_none< RANKER >

Do not quantize the in-memory index (i.e. generate a tf-ordered index)

Constructor & Destructor Documentation

◆ quantize_none()

template<typename RANKER >
JASS::quantize_none< RANKER >::quantize_none ( size_t  documents,
std::shared_ptr< RANKER >  ranker 
)
inline

Constructor.

Parameters
documents[in] The number of documents in the collection.
ranker[in] The ranking function used for quantization.

Member Function Documentation

◆ operator()() [1/3]

template<typename RANKER >
virtual void JASS::quantize_none< RANKER >::operator() ( const slice term,
const index_postings postings,
compress_integer::integer  document_frequency,
compress_integer::integer document_ids,
index_postings_impact::impact_type term_frequencies 
)
inlinevirtual

The callback function for each postings list is operator().

Parameters
term[in] The term name.
postings[in] The postings list.
document_frequency[in] The document frequency of the term
document_ids[in] An array (of length document_frequency) of document ids.
term_frequencies[in] An array (of length document_frequency) of term frequencies (corresponding to document_ids).

Reimplemented from JASS::quantize< RANKER >.

◆ operator()() [2/3]

template<typename RANKER >
virtual void JASS::quantize_none< RANKER >::operator() ( index_manager::delegate writer,
const slice term,
const index_postings postings,
compress_integer::integer  document_frequency,
compress_integer::integer document_ids,
index_postings_impact::impact_type term_frequencies 
)
inlinevirtual

The callback function for each postings list is operator().

Parameters
writer[in] The delegate that writes the quantized result to the output media.
term[in] The term name.
postings[in] The postings list.
document_frequency[in] The document frequency of the term
document_ids[in] An array (of length document_frequency) of document ids.
term_frequencies[in] An array (of length document_frequency) of term frequencies (corresponding to document_ids).

Reimplemented from JASS::quantize< RANKER >.

◆ operator()() [3/3]

template<typename RANKER >
virtual void JASS::quantize_none< RANKER >::operator() ( index_manager::delegate writer,
size_t  document_id,
const slice primary_key 
)
inlinevirtual

The callback function for primary keys (external document ids) is operator(). Not needed for quantization.

Parameters
writer[in] A deligate object to manage the data once quantized.
document_id[in] The internal document identfier.
primary_key[in] This document's primary key (external document identifier).

Reimplemented from JASS::quantize< RANKER >.


The documentation for this class was generated from the following file: