ATLAS Offline Software
Loading...
Searching...
No Matches
InputPreprocessor.h
Go to the documentation of this file.
1/*
2 Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
3*/
4
5#ifndef INPUT_PREPROCESSOR_HH_TAURECTOOLS
6#define INPUT_PREPROCESSOR_HH_TAURECTOOLS
7
10
11#include <Eigen/Dense>
12#include <map>
13#include <vector>
14
15namespace lwtDev {
16
17 using Eigen::VectorXd;
18 using Eigen::MatrixXd;
19
20 // use a normal map externally, since these are more common in user
21 // code. TODO: is it worth changing to unordered_map?
22 typedef std::map<std::string, double> ValueMap;
23 typedef std::vector<std::pair<std::string, double> > ValueVector;
24 typedef std::map<std::string, std::vector<double> > VectorMap;
25
26 // ______________________________________________________________________
27 // input preprocessor (handles normalization and packing into Eigen)
28
30 {
31 public:
32 InputPreprocessor(const std::vector<Input>& inputs);
33 VectorXd operator()(const ValueMap&) const;
34 private:
35 // input transformations
36 VectorXd m_offsets;
37 VectorXd m_scales;
38 std::vector<std::string> m_names;
39 };
40
42 {
43 public:
44 InputVectorPreprocessor(const std::vector<Input>& inputs);
45 MatrixXd operator()(const VectorMap&) const;
46 private:
47 // input transformations
48 VectorXd m_offsets;
49 VectorXd m_scales;
50 std::vector<std::string> m_names;
51 };
52}
53
54#endif // INPUT_PREPROCESSOR_HH_TAURECTOOLS
std::vector< std::string > m_names
VectorXd operator()(const ValueMap &) const
InputPreprocessor(const std::vector< Input > &inputs)
MatrixXd operator()(const VectorMap &) const
std::vector< std::string > m_names
InputVectorPreprocessor(const std::vector< Input > &inputs)
std::vector< std::pair< std::string, double > > ValueVector
std::map< std::string, std::vector< double > > VectorMap
std::map< std::string, double > ValueMap