JASSv2
ranking_function_none.h
Go to the documentation of this file.
1 /*
2  RANKING_FUNCTION_NONE.H
3  -----------------------
4  Copyright (c) 2021 Andrew Trotman
5  Released under the 2-clause BSD license (See:https://en.wikipedia.org/wiki/BSD_licenses)
6 */
13 #pragma once
14 
15 #include <math.h>
16 #include <stdio.h>
17 #include <stdint.h>
18 
19 #include <vector>
20 
21 #include "forceinline.h"
22 #include "compress_integer.h"
23 #include "index_postings_impact.h"
24 
25 
26 namespace JASS
27  {
28  /*
29  CLASS RANKING_FUNCTION_NONE
30  ---------------------------
31  */
36  {
37  public:
38  /*
39  RANKING_FUNCTION_NONE::RANKING_FUNCTION_NONE()
40  ----------------------------------------------
41  */
46  {
47  /* Nothing */
48  }
49 
50  /*
51  RANKING_FUNCTION_NONE::~RANKING_FUNCTION_NONE()
52  -----------------------------------------------
53  */
58  {
59  /* Nothing */
60  }
61 
62  /*
63  RANKING_FUNCTION_ATIRE_BM25::COMPUTE_IDF_COMPONENT()
64  ----------------------------------------------------
65  */
71  forceinline void compute_idf_component(compress_integer::integer document_frequency, compress_integer::integer documents_in_collection)
72  {
73  /* Nothing */
74  }
75 
76  /*
77  RANKING_FUNCTION_ATIRE_BM25::COMPUTE_TF_COMPONENT()
78  ---------------------------------------------------
79  */
85  {
86  /* Nothing */
87  }
88 
89  /*
90  RANKING_FUNCTION_ATIRE_BM25::COMPUTE_SCORE()
91  --------------------------------------------
92  */
100  {
101  return term_frequency;
102  }
103  };
104  }
uint32_t integer
This class and descendants will work on integers of this size. Do not change without also changing JA...
Definition: compress_integer.h:40
Compression codexes for integer sequences.
Holder class for an impact ordered postings list.
Ranking function that returns the TF score - used for term frequency scaling into the quantized range...
Definition: ranking_function_none.h:35
operating system and compiler independant definition of forceinline
forceinline void compute_idf_component(compress_integer::integer document_frequency, compress_integer::integer documents_in_collection)
Called once per term (per query). Computes the IDF component of the ranking function and stores it in...
Definition: ranking_function_none.h:71
~ranking_function_none()
Destructor.
Definition: ranking_function_none.h:57
ranking_function_none()
Constructor.
Definition: ranking_function_none.h:45
forceinline void compute_tf_component(index_postings_impact::impact_type term_frequency)
Compute and store internally the term-frequency based component of the ranking function (useful when ...
Definition: ranking_function_none.h:84
forceinline double compute_score(compress_integer::integer document_id, index_postings_impact::impact_type term_frequency)
Return the term frequency.
Definition: ranking_function_none.h:99
Definition: document_id.h:16
uint16_t impact_type
An impact value (i.e. a term frequency value) is of this type.
Definition: index_postings_impact.h:41
Definition: compress_integer_elias_delta_simd.c:23