Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
sagemath
GitHub Repository: sagemath/sagelib
Path: blob/master/sage/geometry/triangulation/triangulations.h
4096 views
1
#ifndef TRIANGULATION__H
2
#define TRIANGULATION__H
3
4
#include "data.h"
5
#include <Python.h>
6
7
8
9
class triangulations: public std::vector<compact_simplices>
10
{
11
private:
12
hash_value hash_max;
13
compact_simplices no_triangulation_instance;
14
compact_simplices::const_iterator no_triangulation;
15
std::vector<size_t> hash_list;
16
flips bistellar_flips;
17
int position;
18
int star;
19
bool fine;
20
mutable bool need_resize;
21
protected:
22
void find_hash_position(const compact_simplices&, hash_value&, bool&) const;
23
void add_triangulation(const compact_simplices &);
24
public:
25
triangulations(const flips&);
26
27
void add_triang_if_new(const compact_simplices &);
28
void add_neighbours(const simplices &);
29
30
void require_star_triangulation(const int s=-1) { star=s; };
31
void require_fine_triangulation(const bool f=true) { fine=f; };
32
33
bool have_more_triangulations();
34
const compact_simplices& next_triangulation();
35
};
36
37
38
39
40
typedef triangulations* triangulations_ptr;
41
42
triangulations_ptr init_triangulations
43
(int n, int d, int star, bool fine, PyObject* py_seed, PyObject* py_flips);
44
45
PyObject* next_triangulation(triangulations_ptr);
46
47
void delete_triangulations(triangulations_ptr);
48
49
50
#endif
51
52