#include <Gaussian.h>
Definition at line 150 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianInt16DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 184 of file Gaussian.cpp.
185{
186 if (
args.count() != 2)
187 {
188 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
189 }
190
191 auto const mean = to_number<float>(
args.value(0));
192 auto const stddev = to_number<float>(
args.value(1));
193
194 return std::unique_ptr<DataChef>{new GaussianInt16DataChef{mean, stddev}};
195}
The documentation for this struct was generated from the following files: