pixled-lib  1.0
Public Member Functions | List of all members
pixled::point_hash Struct Reference

#include <geometry.h>

Public Member Functions

std::size_t operator() (const point &p) const
 

Detailed Description

A point hash function object.

Member Function Documentation

◆ operator()()

std::size_t pixled::point_hash::operator() ( const point p) const

Computes an hash value for the point p.

The hash is computed as follows (what is probably not an optimal hash function):

auto hash1 = std::hash<coordinate>{}(p.x);
auto hash2 = std::hash<coordinate>{}(p.y);
return hash1 ^ hash2;
Returns
hash value of p

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