cheshirekow  v0.1.0
facet.hpp
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  */
26 #ifndef EDELSBRUNNER96_FACET_HPP_
27 #define EDELSBRUNNER96_FACET_HPP_
28 
29 #include <algorithm>
30 #include <Eigen/Dense>
31 #include <edelsbrunner96/facet.h>
32 #include <edelsbrunner96/simplex.h>
33 
34 namespace edelsbrunner96 {
35 
36 template<class Traits>
38  SimplexRef s_1) {
39  s[0] = s_0;
40  s[1] = s_1;
41  for (int i = 0; i < 2; i++) {
42  v[i] = storage[s[i]].version;
43  }
44 }
45 
46 template<class Traits>
48  for (int i = 0; i < 2; i++) {
49  if (storage[s[i]].version != v[i]) {
50  return false;
51  }
52  }
53  return true;
54 }
55 
56 } // namespace edelsbrunner
57 
58 #endif // EDELSBRUNNER96_FACET_HPP_
Traits::Storage Storage
Definition: facet.h:43
Traits::SimplexRef SimplexRef
Definition: facet.h:44
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