cheshirekow  v0.1.0
facet.h
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 Josh Bialkowski (jbialk@mit.edu)
3  *
4  * This file is part of mpblocks.
5  *
6  * mpblocks is free software: you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation, either version 3 of the License, or
9  * (at your option) any later version.
10  *
11  * mpblocks is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with mpblocks. If not, see <http://www.gnu.org/licenses/>.
18  */
27 #ifndef EDELSBRUNNER96_FACET_H_
28 #define EDELSBRUNNER96_FACET_H_
29 
30 #include <array>
31 #include <cstdint>
32 
33 namespace edelsbrunner96 {
34 
36 
41 template<class Traits>
42 struct Facet {
43  typedef typename Traits::Storage Storage;
44  typedef typename Traits::SimplexRef SimplexRef;
45 
46  std::array<SimplexRef, 2> s;
47  std::array<uint16_t, 2> v;
48 
51  void Construct(Storage& storage, SimplexRef s_0, SimplexRef s_1);
52 
55  bool StillExists(Storage& storage);
56 };
57 
58 } // namespace edelsbrunner96
59 
60 #endif // EDELSBRUNNER96_FACET_H_
Traits::Storage Storage
Definition: facet.h:43
Traits::SimplexRef SimplexRef
Definition: facet.h:44
std::array< uint16_t, 2 > v
the version of the two simplices at creation
Definition: facet.h:47
std::array< SimplexRef, 2 > s
the two simplices
Definition: facet.h:46
A facet is a (d-1)-dimensional simplex.
Definition: facet.h:42
bool StillExists(Storage &storage)
Returns true if the two simplex references still have the same version as the time when Construct was...
Definition: facet.hpp:47
void Construct(Storage &storage, SimplexRef s_0, SimplexRef s_1)
Assigns the two simplex references and latches their current version number.
Definition: facet.hpp:37