#include <Gaussian.h>
Definition at line 124 of file Gaussian.h.
◆ create()
std::unique_ptr< DataChef > souschef::GaussianFloat32DataChefFactory::create |
( |
const Arguments & |
args | ) |
const |
|
virtual |
Implements souschef::DataChefFactory.
Definition at line 123 of file Gaussian.cpp.
124{
125 if (
args.count() != 2)
126 {
127 throw std::runtime_error{"invalid argument count: two arguments (mean/stddev) are expected"};
128 }
129
130 auto const mean = to_number<float>(
args.value(0));
131 auto const stddev = to_number<float>(
args.value(1));
132
133 return std::unique_ptr<DataChef>{new GaussianFloat32DataChef{mean, stddev}};
134}
The documentation for this struct was generated from the following files: