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(
181  );
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
decltype(auto) constexpr size(T &&obj)
ADL-aware version of std::size.
Definition: StdUtils.h:92
static int max(int a, int b)
T min(sqlite3 *const db, std::string const &table_name, std::string const &column_name)
Definition: statistics.h:55
std::vector< short > InputData_t
Definition: raw_test.cc:63

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