PPL Assignment
IRM2015006
RandomK< T > Class Template Reference

#include <randomK.h>

Collaboration diagram for RandomK< T >:
Collaboration graph

Public Member Functions

 RandomK (std::vector< T > elements)
 
T getRandomElem ()
 

Private Attributes

std::vector< Telems
 

Detailed Description

template<class T>
class RandomK< T >

Implementation of KRandom class This class returns a random choice from a given set

Definition at line 10 of file randomK.h.

Constructor & Destructor Documentation

template<class T >
RandomK< T >::RandomK ( std::vector< T elements)
inline

Definition at line 17 of file randomK.h.

Member Function Documentation

template<class T >
T RandomK< T >::getRandomElem ( )
inline

Returns a random choice of element

Definition at line 22 of file randomK.h.

Member Data Documentation

template<class T >
std::vector<T> RandomK< T >::elems
private

The elements under consideration

Definition at line 14 of file randomK.h.


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