28#include <SimoxUtility/algorithm/string/string_tools.h>
45 const std::map<std::string, Normalization>& normalization = {});
58 bool pathInWhitelist(
const aron::Path& p)
const;
63 checkForNormalization(
const aron::Path& p,
const T& t)
65 for (
const auto& [n, v] : normalization)
67 if (simox::alg::starts_with(p.
toString(), n))
69 auto diff = v.max - v.min;
70 auto norm = (t - v.min) / diff;
77 std::vector<std::string> whitelist;
78 std::map<std::string, Normalization> normalization;
std::string toString() const
void visitAronVariant(const data::DictPtr &) override
aron::data::VariantPtr data
WhitelistFilter(const std::vector< std::string > &whitelist, const std::map< std::string, Normalization > &normalization={})
std::shared_ptr< Dict > DictPtr
std::shared_ptr< List > ListPtr
std::shared_ptr< Bool > BoolPtr
std::shared_ptr< Float > FloatPtr
std::shared_ptr< Variant > VariantPtr
std::shared_ptr< NDArray > NDArrayPtr
std::shared_ptr< Long > LongPtr
std::shared_ptr< Int > IntPtr
std::shared_ptr< Double > DoublePtr
std::shared_ptr< String > StringPtr
double norm(const Point &a)