DGtal  1.2.0
Public Member Functions
boost::hash< DGtal::SignedKhalimskyCell< dim, TInteger > > Struct Template Reference

Extend boost namespace to define a boost::hash function on DGtal::SignedKhalimskyCell. More...

#include <DGtal/topology/KhalimskyCellHashFunctions.h>

Public Member Functions

size_t operator() (const DGtal::SignedKhalimskyCell< dim, TInteger > &pp) const
 

Detailed Description

template<DGtal::Dimension dim, typename TInteger>
struct boost::hash< DGtal::SignedKhalimskyCell< dim, TInteger > >

Extend boost namespace to define a boost::hash function on DGtal::SignedKhalimskyCell.

Definition at line 109 of file KhalimskyCellHashFunctions.h.

Member Function Documentation

◆ operator()()

template<DGtal::Dimension dim, typename TInteger >
size_t boost::hash< DGtal::SignedKhalimskyCell< dim, TInteger > >::operator() ( const DGtal::SignedKhalimskyCell< dim, TInteger > &  pp) const
inline

Definition at line 111 of file KhalimskyCellHashFunctions.h.

112  {
113  auto const& p = pp.preCell();
114  return p.positive
115  ? boost::hash_range(p.coordinates.begin(), p.coordinates.end())
116  : boost::hash_range(p.coordinates.begin(), p.coordinates.end()) ^ ( (size_t) 0x7a0d3fe9 );
117  }
Definition: Boost.dox:28
SPreCell const & preCell() const
Returns the underlying constant signed pre-cell.

References DGtal::SignedKhalimskyPreCell< dim, TInteger >::positive, and DGtal::SignedKhalimskyCell< dim, TInteger >::preCell().


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