21template <
typename T,
typename C>
34template <
typename T,
typename C>
39 mooseAssert(keys.size() ==
values.size(),
40 "Map should be made from keys (" + std::to_string(keys.size()) +
") and values (" +
41 std::to_string(
values.size()) +
") of the same size");
48 std::transform(keys.begin(),
51 std::inserter(map, map.end()),
52 [](
const T & a,
const C & b) { return std::make_pair(a, b); });
60 std::map<T, MooseEnum> map;
61 mooseAssert(keys.size() ==
values.size(),
62 "Map should be made from keys and values of the same size");
66 std::transform(keys.begin(),
69 std::inserter(map, map.end()),
74 MooseEnum single_value(values.getRawNames(), b.name());
75 return std::make_pair(a, single_value);
std::array< Real, 2 > values
Class for containing MooseEnum item information.
This is a "smart" enum class intended to replace many of the shortcomings in the C++ enum type.
MOOSE now contains C++17 code, so give a reasonable error message stating what the user can do to add...
std::map< T, MooseEnum > createMapFromVectorAndMultiMooseEnum(const std::vector< T > &keys, const MultiMooseEnum &values)
Create a map from a vector of keys and MultiMooseEnum acting as a vector.
std::map< T, C > createMapFromVectors(const std::vector< T > &keys, const std::vector< C > &values)
Create a map from two vectors.