libMesh::ElemHashUtils Struct Reference

A struct providing convenience functions for hashing elements. More...

#include <elem_hash.h>

Public Member Functions

std::size_t operator() (const Elem *elem) const
 
bool operator() (const Elem *lhs, const Elem *rhs) const
 

Detailed Description

A struct providing convenience functions for hashing elements.

The ElemHashUtils struct defines functions used for the "Hash" and "Pred" template arguments of the various "unordered" containers, e.g. template <class Key, // unordered_multiset::key_type/value_type class Hash = hash<Key>, // unordered_multiset::hasher class Pred = equal_to<Key>, // unordered_multiset::key_equal class Alloc = allocator<Key> // unordered_multiset::allocator_type > class unordered_multiset;

Author
John W. Peterson
Date
2015

Definition at line 45 of file elem_hash.h.

Member Function Documentation

std::size_t libMesh::ElemHashUtils::operator() ( const Elem elem) const
inline

Definition at line 52 of file elem_hash.h.

References libMesh::Elem::key().

53  {
54  return cast_int<std::size_t>(elem->key());
55  }
bool libMesh::ElemHashUtils::operator() ( const Elem lhs,
const Elem rhs 
) const
inline

Definition at line 62 of file elem_hash.h.

References libMesh::Elem::key().

63  {
64  return lhs->key() == rhs->key();
65  }

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