clang-tools
10.0.0
|
#include <Iterator.h>
Public Member Functions | |
Corpus (DocID Size) | |
std::unique_ptr< Iterator > | intersect (std::vector< std::unique_ptr< Iterator >> Children) const |
Returns AND Iterator which performs the intersection of the PostingLists of its children. More... | |
std::unique_ptr< Iterator > | unionOf (std::vector< std::unique_ptr< Iterator >> Children) const |
Returns OR Iterator which performs the union of the PostingLists of its children. More... | |
std::unique_ptr< Iterator > | all () const |
Returns TRUE Iterator which iterates over "virtual" PostingList containing all items in range [0, Size) in an efficient manner. More... | |
std::unique_ptr< Iterator > | none () const |
Returns FALSE Iterator which iterates over no documents. More... | |
std::unique_ptr< Iterator > | boost (std::unique_ptr< Iterator > Child, float Factor) const |
Returns BOOST iterator which multiplies the score of each item by given factor. More... | |
std::unique_ptr< Iterator > | limit (std::unique_ptr< Iterator > Child, size_t Limit) const |
Returns LIMIT iterator, which yields up to N elements of its child iterator. More... | |
template<typename... Args> | |
std::unique_ptr< Iterator > | intersect (Args... args) const |
This allows intersect(create(...), create(...)) syntax. More... | |
template<typename... Args> | |
std::unique_ptr< Iterator > | unionOf (Args... args) const |
This allows unionOf(create(...), create(...)) syntax. More... | |
Definition at line 134 of file Iterator.h.
|
inlineexplicit |
Definition at line 138 of file Iterator.h.
References Children.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::all | ( | ) | const |
Returns TRUE Iterator which iterates over "virtual" PostingList containing all items in range [0, Size) in an efficient manner.
Definition at line 417 of file Iterator.cpp.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::boost | ( | std::unique_ptr< Iterator > | Child, |
float | Factor | ||
) | const |
Returns BOOST iterator which multiplies the score of each item by given factor.
Boosting can be used as a computationally inexpensive filtering. Users can return significantly more items using consumeAndBoost() and then trim Top K using retrieval score.
Definition at line 425 of file Iterator.cpp.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::intersect | ( | std::vector< std::unique_ptr< Iterator >> | Children | ) | const |
Returns AND Iterator which performs the intersection of the PostingLists of its children.
consume(): AND Iterator returns the product of Childrens' boosting scores.
Definition at line 358 of file Iterator.cpp.
|
inline |
This allows intersect(create(...), create(...)) syntax.
Definition at line 179 of file Iterator.h.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::limit | ( | std::unique_ptr< Iterator > | Child, |
size_t | Limit | ||
) | const |
Returns LIMIT iterator, which yields up to N elements of its child iterator.
Elements only count towards the limit if they are part of the final result set. Therefore the following iterator (AND (2) (LIMIT (1 2) 1)) yields (2), not ().
Definition at line 434 of file Iterator.cpp.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::none | ( | ) | const |
Returns FALSE Iterator which iterates over no documents.
Definition at line 421 of file Iterator.cpp.
std::unique_ptr< Iterator > clang::clangd::dex::Corpus::unionOf | ( | std::vector< std::unique_ptr< Iterator >> | Children | ) | const |
Returns OR Iterator which performs the union of the PostingLists of its children.
consume(): OR Iterator returns the highest boost value among children containing the requested item.
Definition at line 388 of file Iterator.cpp.
|
inline |
This allows unionOf(create(...), create(...)) syntax.
Definition at line 187 of file Iterator.h.