Rosetta  2020.37
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Private Attributes | List of all members
numeric::random::WeightedReservoirItem< T > Class Template Reference

#include <WeightedReservoirSampler.hh>

Public Member Functions

 WeightedReservoirItem (T item, double weight)
 Associates the given item with a real-valued weight. More...
 
T item () const
 Returns the item. More...
 
double weight () const
 Returns the weight. More...
 
bool operator< (WeightedReservoirItem< T > const &o) const
 Returns true if this item's weight is less than <o>'s weight. More...
 

Private Attributes

T item_
 the item More...
 
double weight_
 the item's weight More...
 

Constructor & Destructor Documentation

template<typename T>
numeric::random::WeightedReservoirItem< T >::WeightedReservoirItem ( T  item,
double  weight 
)
inline

Associates the given item with a real-valued weight.

Member Function Documentation

template<typename T>
T numeric::random::WeightedReservoirItem< T >::item ( ) const
inline
template<typename T>
bool numeric::random::WeightedReservoirItem< T >::operator< ( WeightedReservoirItem< T > const &  o) const
inline

Returns true if this item's weight is less than <o>'s weight.

References basic::options::OptionKeys::out::file::o, and numeric::random::WeightedReservoirItem< T >::weight().

template<typename T>
double numeric::random::WeightedReservoirItem< T >::weight ( ) const
inline

Member Data Documentation

template<typename T>
T numeric::random::WeightedReservoirItem< T >::item_
private
template<typename T>
double numeric::random::WeightedReservoirItem< T >::weight_
private

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