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