gmsh-TingyuanDoc  0.1
An Open-Source Timing-driven Analytical Mixed-size FPGA Placer
MEdgeHash.h
Go to the documentation of this file.
1 // Gmsh - Copyright (C) 1997-2022 C. Geuzaine, J.-F. Remacle
2 //
3 // See the LICENSE.txt file in the Gmsh root directory for license information.
4 // Please report all issues on https://gitlab.onelab.info/gmsh/gmsh/issues.
5 
6 #ifndef MEDGE_HASH_H
7 #define MEDGE_HASH_H
8 
9 #include "MEdge.h"
10 #include "Hash.h"
11 
12 struct MEdgeHash : public std::unary_function<MEdge, size_t> {
13  size_t operator()(const MEdge &e) const
14  {
15  size_t v[2] = {e.getMinVertex()->getNum(), e.getMaxVertex()->getNum()};
16  return HashFNV1a<sizeof(size_t[2])>::eval(v);
17  }
18 };
19 
20 #endif
MEdge
Definition: MEdge.h:14
MEdge::getMaxVertex
MVertex * getMaxVertex() const
Definition: MEdge.h:42
MVertex::getNum
std::size_t getNum() const
Definition: MVertex.h:86
MEdgeHash
Definition: MEdgeHash.h:12
MEdge::getMinVertex
MVertex * getMinVertex() const
Definition: MEdge.h:41
HashFNV1a
Definition: Hash.h:49
MEdge.h
Hash.h
MEdgeHash::operator()
size_t operator()(const MEdge &e) const
Definition: MEdgeHash.h:13