18 params.
addClassDescription(
"Surrogate that evaluates the value from the nearest point from data " 19 "in [NearestPointTrainer.md]");
25 _sample_points(getModelData<
std::vector<
std::vector<
Real>>>(
"_sample_points")),
26 _sample_results(getModelData<
std::vector<
std::vector<
Real>>>(
"_sample_results"))
35 "Input point does not match dimensionality of training data.");
44 "Input point does not match dimensionality of training data.");
60 Real dist_min = std::numeric_limits<Real>::max();
66 for (
unsigned int i = 0; i <
x.size(); ++i)
unsigned int findNearestPoint(const std::vector< Real > &x) const
virtual Real evaluate(const std::vector< Real > &x) const override
Evaluate surrogate model given a row of parameters.
static InputParameters validParams()
const std::vector< double > y
NearestPointSurrogate(const InputParameters ¶meters)
static InputParameters validParams()
const std::vector< double > x
const std::vector< std::vector< Real > > & _sample_points
Array containing sample points.
registerMooseObject("StochasticToolsApp", NearestPointSurrogate)
DIE A HORRIBLE DEATH HERE typedef LIBMESH_DEFAULT_SCALAR_TYPE Real
const std::vector< std::vector< Real > > & _sample_results
Array containing results.
auto index_range(const T &sizable)