#include <Gaussian.h>
Definition at line 140 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianFloat32DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 158 of file Gaussian.cpp.
159{
160 if (
args.count() != 2)
161 {
162 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
163 }
164
165 auto const mean = to_number<float>(
args.value(0));
166 auto const stddev = to_number<float>(
args.value(1));
167
168 return std::unique_ptr<DataChef>{new GaussianFloat32DataChef{mean, stddev}};
169}
The documentation for this struct was generated from the following files: