20 #ifndef LIBMESH_PARALLEL_CONVERSION_UTILS_H 21 #define LIBMESH_PARALLEL_CONVERSION_UTILS_H 26 #ifdef LIBMESH_HAVE_LIBHILBERT 49 template <
typename KeyType>
56 for (std::size_t i=1; i<v.size(); i++)
67 template <
typename KeyType>
71 return static_cast<double>(k);
81 template <
typename KeyType>
86 return static_cast<KeyType
>(f);
93 template <
typename FirstKeyType,
typename SecondKeyType>
96 std::pair<FirstKeyType,SecondKeyType>
to_key_type (
const double f)
109 template <
typename FirstKeyType,
typename SecondKeyType>
111 double to_double (
const std::pair<FirstKeyType,SecondKeyType> &k)
117 #ifdef LIBMESH_HAVE_LIBHILBERT 123 return static_cast<double>(bvt.rack2);
129 Hilbert::HilbertIndices
132 Hilbert::HilbertIndices bvt;
136 bvt.rack2 =
static_cast<Hilbert::inttype
>(f);
141 #endif // LIBMESH_HAVE_LIBHILBERT 147 #endif // LIBMESH_PARALLEL_CONVERSION_UTILS_H
static Hilbert::HilbertIndices to_key_type(const double f)
bool is_sorted(const std::vector< KeyType > &v)
static std::pair< FirstKeyType, SecondKeyType > to_key_type(const double f)
static KeyType to_key_type(const double f)
double to_double(const KeyType &k)