#include <Gaussian.h>
Definition at line 149 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianInt8DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 175 of file Gaussian.cpp.
176{
177 if (
args.count() != 2)
178 {
179 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
180 }
181
182 auto const mean = to_number<float>(
args.value(0));
183 auto const stddev = to_number<float>(
args.value(1));
184
185 return std::unique_ptr<DataChef>{new GaussianInt8DataChef{mean, stddev}};
186}
The documentation for this struct was generated from the following files: