edgeHashes.H
Go to the documentation of this file.
1 /*---------------------------------------------------------------------------*\
2  ========= |
3  \\ / F ield | OpenFOAM: The Open Source CFD Toolbox
4  \\ / O peration |
5  \\ / A nd | www.openfoam.com
6  \\/ M anipulation |
7 -------------------------------------------------------------------------------
8  Copyright (C) 2011 OpenFOAM Foundation
9  Copyright (C) 2017-2023 OpenCFD Ltd.
10 -------------------------------------------------------------------------------
11 License
12  This file is part of OpenFOAM.
13 
14  OpenFOAM is free software: you can redistribute it and/or modify it
15  under the terms of the GNU General Public License as published by
16  the Free Software Foundation, either version 3 of the License, or
17  (at your option) any later version.
18 
19  OpenFOAM is distributed in the hope that it will be useful, but WITHOUT
20  ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
21  FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
22  for more details.
23 
24  You should have received a copy of the GNU General Public License
25  along with OpenFOAM. If not, see <http://www.gnu.org/licenses/>.
26 
27 Class
28  Foam::EdgeMap
29 
30 Description
31  Map from edge (expressed as its endpoints) to value.
32  Hashing (and ==) on an edge is symmetric.
33 
34 Note
35  For easier forward declaration it is implemented as a separate class
36  rather than a template alias.
37 
38 \*---------------------------------------------------------------------------*/
39 
40 #ifndef Foam_edgeHashes_H
41 #define Foam_edgeHashes_H
42 
43 #include "edge.H"
44 #include "HashSet.H"
45 #include "HashTable.H"
46 
47 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
48 
49 namespace Foam
50 {
51 
52 // Typedefs
53 
56 
57 
58 /*---------------------------------------------------------------------------*\
59  Class EdgeMap Declaration
60 \*---------------------------------------------------------------------------*/
61 
62 template<class T>
63 class EdgeMap
64 :
65  public HashTable<T, edge, Hash<edge>>
66 {
67 public:
68 
69  // Constructors
70 
71  //- Inherit constructors from HashTable
73 };
74 
75 
76 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
77 
78 } // End namespace Foam
79 
80 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * //
81 
82 #endif
83 
84 // ************************************************************************* //
A HashTable with keys but without contents that is similar to std::unordered_set. ...
Definition: HashSet.H:73
HashSet< edge, Hash< edge > > edgeHashSet
A HashSet with edge for its key. Hashing (and ==) on an edge is symmetric.
Definition: edgeHashes.H:48
HashTable() noexcept
Default construct: empty without allocation (capacity=0)
Definition: HashTable.C:33
A HashTable similar to std::unordered_map.
Definition: HashTable.H:108
Map from edge (expressed as its endpoints) to value. Hashing (and ==) on an edge is symmetric...
Definition: edgeHashes.H:56
Namespace for OpenFOAM.