#include <Gaussian.h>
Definition at line 145 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianInt32DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 171 of file Gaussian.cpp.
172{
173 if (
args.count() != 2)
174 {
175 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
176 }
177
178 auto const mean = to_number<float>(
args.value(0));
179 auto const stddev = to_number<float>(
args.value(1));
180
181 return std::unique_ptr<DataChef>{new GaussianInt32DataChef{mean, stddev}};
182}
The documentation for this struct was generated from the following files: