#include <InputPreprocessor.h>
Definition at line 41 of file InputPreprocessor.h.
◆ InputVectorPreprocessor()
lwtDev::InputVectorPreprocessor::InputVectorPreprocessor |
( |
const std::vector< Input > & |
inputs | ) |
|
◆ operator()()
MatrixXd lwtDev::InputVectorPreprocessor::operator() |
( |
const VectorMap & |
in | ) |
const |
Definition at line 57 of file InputPreprocessor.cxx.
58 using namespace Eigen;
60 throw NNEvaluationException(
"Empty input map");
62 size_t n_cols = in.begin()->second.size();
63 MatrixXd inmat(
m_names.size(), n_cols);
65 for (
const auto& in_name:
m_names) {
66 if (!in.count(in_name)) {
67 throw NNEvaluationException(
"can't find input: " + in_name);
69 const auto& invec = in.at(in_name);
70 if (invec.size() != n_cols) {
71 throw NNEvaluationException(
"Input vector size mismatch");
73 inmat.row(in_num) = Map<const VectorXd>(invec.data(), invec.size());
77 return MatrixXd(
m_names.size(), 0);
◆ m_names
std::vector<std::string> lwtDev::InputVectorPreprocessor::m_names |
|
private |
◆ m_offsets
VectorXd lwtDev::InputVectorPreprocessor::m_offsets |
|
private |
◆ m_scales
VectorXd lwtDev::InputVectorPreprocessor::m_scales |
|
private |
The documentation for this class was generated from the following files: