DHART
Loading...
Searching...
No Matches
std::hash< std::array< T, 3 > > Struct Template Reference

Template specialization of std::hash for using std::array<numeric_type, 3>. More...

#include <meshinfo.h>

Public Member Functions

std::size_t operator() (const std::array< T, 3 > &k) const
 Calculate a hash for k. More...
 

Detailed Description

template<typename T>
struct std::hash< std::array< T, 3 > >

Template specialization of std::hash for using std::array<numeric_type, 3>.

Definition at line 59 of file meshinfo.h.

Member Function Documentation

◆ operator()()

template<typename T >
std::size_t std::hash< std::array< T, 3 > >::operator() ( const std::array< T, 3 > &  k) const
inline

Calculate a hash for k.

Parameters
kReference to an array of coordinates (x, y, z)
Returns
The hashed value of k.

Combines the hash of x,y,and z.

// be sure to #include "meshinfo.h"
// Create coordinates, (x, y, z)
std::array<numeric_type, 3> arr = { 123.0, 456.1, 789.2 };
// Using the template specialization for std::hash (which takes a std::array<numeric_type,
// 3>), we retrieve a seed
std::size_t arr_hash = std::hash<std::array<numeric_type, 3>>(arr);

Definition at line 77 of file meshinfo.h.

References std::array_hash_combine_impl().

+ Here is the call graph for this function:

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