All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
Public Member Functions | List of all members
RandomDataCreator Class Reference

Data creator: uniformly random data, full range. More...

Inheritance diagram for RandomDataCreator:
DataCreatorBase

Public Member Functions

virtual InputData_t create (size_t size) override
 Creates and returns the data sample. More...
 
- Public Member Functions inherited from DataCreatorBase
 DataCreatorBase (std::string new_name)
 Constructor: just assigns a name to this data set. More...
 
std::string name () const
 Returns the name of this set. More...
 
virtual ~DataCreatorBase ()
 Virtual destructor. More...
 

Additional Inherited Members

- Public Types inherited from DataCreatorBase
typedef std::vector< short > InputData_t
 
- Static Public Attributes inherited from DataCreatorBase
static std::default_random_engine random_engine
 Random engine shared by all the data creators. More...
 

Detailed Description

Data creator: uniformly random data, full range.

Definition at line 172 of file raw_test.cc.

Member Function Documentation

virtual InputData_t RandomDataCreator::create ( size_t  size)
inlineoverridevirtual

Creates and returns the data sample.

Implements DataCreatorBase.

Definition at line 176 of file raw_test.cc.

177  {
178  std::uniform_int_distribution<short> uniform(
179  std::numeric_limits<short>::min(),
180  std::numeric_limits<short>::max()
181  );
182  InputData_t data(size);
183  for (auto& item: data)
184  item = InputData_t::value_type(uniform(random_engine));
185  return data;
186  } // create()
static std::default_random_engine random_engine
Random engine shared by all the data creators.
Definition: raw_test.cc:66
std::size_t size(FixedBins< T, C > const &) noexcept
Definition: FixedBins.h:561
std::vector< short > InputData_t
Definition: raw_test.cc:63

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