DGtal 1.3.0
Loading...
Searching...
No Matches
Public Member Functions
std::hash< DGtal::SignedKhalimskyCell< dim, TInteger > > Struct Template Reference

Extend std namespace to define a std::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 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

◆ operator()()

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.

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 }
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: