#include <Gaussian.h>
Definition at line 165 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianInt8DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 210 of file Gaussian.cpp.
211{
212 if (
args.count() != 2)
213 {
214 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
215 }
216
217 auto const mean = to_number<float>(
args.value(0));
218 auto const stddev = to_number<float>(
args.value(1));
219
220 return std::unique_ptr<DataChef>{new GaussianInt8DataChef{mean, stddev}};
221}
The documentation for this struct was generated from the following files: