Google OR-Tools v9.15
a fast and portable software suite for combinatorial optimization
Loading...
Searching...
No Matches
operations_research::SpaceSavingMostFrequent< T, Hash, Eq > Class Template Reference

Detailed Description

template<typename T, typename Hash = absl::Hash<T>, typename Eq = std::equal_to<T>>
class operations_research::SpaceSavingMostFrequent< T, Hash, Eq >

Definition at line 64 of file space_saving_most_frequent.h.

#include <space_saving_most_frequent.h>

Public Member Functions

 SpaceSavingMostFrequent (int storage_size)
 ~SpaceSavingMostFrequent ()
void Add (T value)
void FullyRemove (const T &value)
std::vector< std::pair< T, int64_t > > GetMostFrequent (int num_samples) const
PopMostFrequent ()
int64_t CountOfMostFrequent () const

Constructor & Destructor Documentation

◆ SpaceSavingMostFrequent()

template<typename T, typename Hash, typename Eq>
operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::SpaceSavingMostFrequent ( int storage_size)
explicit

Definition at line 170 of file space_saving_most_frequent.h.

◆ ~SpaceSavingMostFrequent()

template<typename T, typename Hash, typename Eq>
operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::~SpaceSavingMostFrequent ( )

Definition at line 181 of file space_saving_most_frequent.h.

Member Function Documentation

◆ Add()

template<typename T, typename Hash, typename Eq>
void operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::Add ( T value)

Definition at line 197 of file space_saving_most_frequent.h.

◆ CountOfMostFrequent()

template<typename T, typename Hash, typename Eq>
int64_t operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::CountOfMostFrequent ( ) const

Definition at line 306 of file space_saving_most_frequent.h.

◆ FullyRemove()

template<typename T, typename Hash, typename Eq>
void operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::FullyRemove ( const T & value)

Definition at line 270 of file space_saving_most_frequent.h.

◆ GetMostFrequent()

template<typename T, typename Hash, typename Eq>
std::vector< std::pair< T, int64_t > > operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::GetMostFrequent ( int num_samples) const

Definition at line 278 of file space_saving_most_frequent.h.

◆ PopMostFrequent()

template<typename T, typename Hash, typename Eq>
T operations_research::SpaceSavingMostFrequent< T, Hash, Eq >::PopMostFrequent ( )

Definition at line 295 of file space_saving_most_frequent.h.


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