clang-tools 10.0.0

Public Types | Public Member Functions | List of all members
clang::clangd::TopN< T, Compare > Class Template Reference

TopN<T> is a lossy container that preserves only the "best" N elements. More...

`#include <Quality.h>`

## Public Types
using | value_type = T

## Public Member Functions
| TopN (size_t N, Compare Greater=Compare())
bool | push (value_type &&V)
std::vector< value_type > | items () &&

## Detailed Description

### template<typename T, typename Compare = std::greater<T>>
class clang::clangd::TopN< T, Compare >

TopN<T> is a lossy container that preserves only the "best" N elements.

Definition at line 152 of file Quality.h.

## Member Typedef Documentation

## ◆ value_type

template<typename T, typename Compare = std::greater<T>>

using clang::clangd::TopN< T, Compare >::value_type = T

Definition at line 154 of file Quality.h.

## Constructor & Destructor Documentation

## ◆ TopN()

template<typename T, typename Compare = std::greater<T>>

clang::clangd::TopN< T, Compare >::TopN | ( | size_t | N,
|  | Compare | Greater = `Compare()`
| ) |  |
| inline

Definition at line 155 of file Quality.h.

## Member Function Documentation

## ◆ items()

template<typename T, typename Compare = std::greater<T>>

std::vector<value_type> clang::clangd::TopN< T, Compare >::items | ( |  | ) | &&
| inline

Definition at line 179 of file Quality.h.

References Score, and clang::clangd::sortText().

## ◆ push()

template<typename T, typename Compare = std::greater<T>>

bool clang::clangd::TopN< T, Compare >::push | ( | value_type && | V | ) |
| inline

Definition at line 160 of file Quality.h.

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

- Quality.h