DGtal  0.9.3beta
Public Member Functions
std::hash< DGtal::SignedKhalimskyCell< dim, TInteger > > Struct Template Reference

#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 std::hash< DGtal::SignedKhalimskyCell< dim, TInteger > >

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

Definition at line 72 of file KhalimskyCellHashFunctions.h.

Member Function Documentation

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

Definition at line 74 of file KhalimskyCellHashFunctions.h.

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

75  {
76  auto const& p = pp.preCell();
77  return p.positive
78  ? boost::hash_range(p.coordinates.begin(), p.coordinates.end())
79  : boost::hash_range(p.coordinates.begin(), p.coordinates.end()) ^ ( (size_t) 0x7a0d3fe9 );
80  }
SPreCell const & preCell() const
Returns the underlying constant signed pre-cell.

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