clang-tools 8.0.0

Public Member Functions | List of all members
clang::clangd::dex::PostingList Class Reference

PostingList is the storage of DocIDs which can be inserted to the Query Tree as a leaf by constructing Iterator over the PostingList object. More...

`#include <PostingList.h>`

## Public Member Functions
| PostingList (llvm::ArrayRef< DocID > Documents)
std::unique_ptr< Iterator > | iterator (const Token *Tok=nullptr) const
| Constructs DocumentIterator over given posting list. More...
size_t | bytes () const
| Returns in-memory size of external storage. More...

## Detailed Description

PostingList is the storage of DocIDs which can be inserted to the Query Tree as a leaf by constructing Iterator over the PostingList object.

DocIDs are stored in underlying chunks. Compression saves memory at a small cost in access time, which is still fast enough in practice.

Definition at line 60 of file PostingList.h.

## Constructor & Destructor Documentation

## ◆ PostingList()

clang::clangd::dex::PostingList::PostingList | ( | llvm::ArrayRef< DocID > | Documents | ) |
| explicit

Definition at line 219 of file PostingList.cpp.

## Member Function Documentation

## ◆ bytes()

size_t clang::clangd::dex::PostingList::bytes | ( |  | ) | const
| inline

Returns in-memory size of external storage.

Definition at line 70 of file PostingList.h.

## ◆ iterator()

std::unique_ptr< Iterator > clang::clangd::dex::PostingList::iterator | ( | const Token * | Tok = `nullptr` | ) | const

Constructs DocumentIterator over given posting list.

DocumentIterator will go through the chunks and decompress them on-the-fly when necessary. If given, Tok is only used for the string representation.

Definition at line 222 of file PostingList.cpp.

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

- PostingList.h
- PostingList.cpp