clang-tools 20.0.0git
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_typeitems () &&
 

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 189 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 191 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 192 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 216 of file Quality.h.

◆ push()

template<typename T , typename Compare = std::greater<T>>
bool clang::clangd::TopN< T, Compare >::push ( value_type &&  V)
inline

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