aGrUM  0.20.3
a C++ library for (probabilistic) graphical models
gum::HashFuncCastKey< Key > Class Template Reference

Generic hash functions for keys castable as Size whose size is either smaller than Size, or equal to that of one or two Size. More...

#include <agrum/tools/core/hashFunc.h>

Public Types

using type = typename std::conditional< sizeof(Key)<=sizeof(Size) &&std::is_integral< Key >::value, HashFuncSmallKey< Key >, typename std::conditional< sizeof(Key)< sizeof(Size), HashFuncSmallCastKey< Key >, typename std::conditional< sizeof(Key)==sizeof(Size), HashFuncMediumCastKey< Key >, typename std::conditional< sizeof(Key)==2 *sizeof(Size), HashFuncLargeCastKey< Key >, void >::type >::type >::type >::type
 The type used by this class. More...
 

Detailed Description

template<typename Key>
class gum::HashFuncCastKey< Key >

Generic hash functions for keys castable as Size whose size is either smaller than Size, or equal to that of one or two Size.

This class uses metaprogramming to select automatically which of classes HashFuncSmallCastKey, HashFuncMediumCastKey or HashFuncLargeCastKey you should inherit from.

Template Parameters
KeyThe type hashed by this hash function.

Definition at line 380 of file hashFunc.h.

Member Typedef Documentation

◆ type

template<typename Key>
using gum::HashFuncCastKey< Key >::type = typename std::conditional< sizeof(Key) <= sizeof(Size) && std::is_integral< Key >::value, HashFuncSmallKey< Key >, typename std::conditional< sizeof(Key) < sizeof(Size), HashFuncSmallCastKey< Key >, typename std::conditional< sizeof(Key) == sizeof(Size), HashFuncMediumCastKey< Key >, typename std::conditional< sizeof(Key) == 2 * sizeof(Size), HashFuncLargeCastKey< Key >, void >::type >::type >::type >:: type

The type used by this class.

Definition at line 393 of file hashFunc.h.


The documentation for this class was generated from the following file: