Loading...
Searching...
No Matches
gpr::optim::MinimumSpectrumCache::Hash Struct Reference

#include <gpr/optimization/EndpointConnectivity.h>

Public Member Functions

std::size_t operator() (const Key &key) const noexcept

Detailed Description

Definition at line 764 of file EndpointConnectivity.h.

Member Function Documentation

◆ operator()()

std::size_t gpr::optim::MinimumSpectrumCache::Hash::operator() ( const Key & key) const
inlinenoexcept

Definition at line 765 of file EndpointConnectivity.h.

766 {
767 const auto* bytes =
768 reinterpret_cast<const unsigned char*>(key.position.data());
769 const std::size_t n =
770 sizeof(double) * static_cast<std::size_t>(key.position.size());
771 std::size_t hash = 14695981039346656037ull;
772 for (std::size_t i = 0; i < n; ++i) {
773 hash ^= bytes[i];
774 hash *= 1099511628211ull;
775 }
776 return hash;
777 }

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