#include <Gaussian.h>
Definition at line 155 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianUint8DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 197 of file Gaussian.cpp.
198{
199 if (
args.count() != 2)
200 {
201 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
202 }
203
204 auto const mean = to_number<float>(
args.value(0));
205 auto const stddev = to_number<float>(
args.value(1));
206
207 return std::unique_ptr<DataChef>{new GaussianUint8DataChef{mean, stddev}};
208}
The documentation for this struct was generated from the following files: