aGrUM  0.17.2
a C++ library for (probabilistic) graphical models
LpInterface_inl.h
Go to the documentation of this file.
1 
30 #include <agrum/CN/LpInterface.h>
31 
32 #ifndef DOXYGEN_SHOULD_SKIP_THIS
33 
34 namespace gum {
35 
36  INLINE Size
37  HashFunc< credal::lp::LpCol >::castToSize(const credal::lp::LpCol& key) {
38  return Size(key.id());
39  }
40 
42  const credal::lp::LpCol& key) const {
43  return (castToSize(key) * gum::HashFuncConst::gold) & this->_hash_mask;
44  }
45 
46 } /* namespace gum */
47 
48 #endif /* DOXYGEN_SHOULD_SKIP_THIS */
static constexpr Size gold
Definition: hashFunc.h:76
static Size castToSize(const credal::lp::LpCol &key)
Returns the value of a key as a Size.
virtual Size operator()(const credal::lp::LpCol &key) const override final
Overload of operator () to compute hash of a variable LpCol.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Copyright 2005-2020 Pierre-Henri WUILLEMIN () et Christophe GONZALES () info_at_agrum_dot_org.
Definition: agrum.h:25
std::size_t Size
In aGrUM, hashed values are unsigned long int.
Definition: types.h:48