-
Notifications
You must be signed in to change notification settings - Fork 0
/
Delone.h
65 lines (56 loc) · 1.97 KB
/
Delone.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
#ifndef DELAUNAY_H
#define DELAUNAY_H
#include "S6.h"
#include "B4.h"
#include "D7.h"
#include "MatD7.h"
#include "Selling.h"
#include <set>
class D7;
class MatG6;
class MatD7;
class Delone {
public:
template<typename TVEC>
static bool Reduce(const TVEC& d, TVEC& dd) {
S6 s6out;
const S6 s6in(d);
const bool b = Selling::Reduce(s6in, s6out);
MatD7 mat;
D7 d7(s6out);
dd = S6(sort(d7, mat));
return b;
}
template<typename TVEC, typename TMAT>
static bool Reduce(const TVEC& d, TMAT& m, TVEC& dd) {
MatS6 mS6;
S6 s6out;
const bool b = Reduce(S6(d), mS6, s6out, 0.0);
MatD7 mD7(mS6);
dd = S6(sort(D7(s6out), mD7));
m = mD7;
return b;
}
static bool Reduce(const S6& d, MatS6& m, S6& dd, const double delta);
static bool Reduce(const S6& d, S6& dd, const bool sellingFirst);
static bool Reduce(const S6& d, S6& dd);
static bool Reduce(const D7& d, D7& dd, const bool sellingFirst);
static bool Reduce(const D7& d, D7& dd);
static bool Reduce(const S6& d, MatS6& m, S6& dd);
static D7 sort(const D7& d, MatD7& m);
static D7 sort(const D7& d);
static bool IsReduced(const G6& v);
static bool IsReduced(const G6& v, const double delta);
static bool IsDelone( const D7& v, const double delta = 1.0E-6 );
static std::vector<MatD7> GetD7Reflections();
static std::vector<MatS6> LoadLatticeTypeProjectors();
static std::vector<std::pair<std::string, MatS6> > LoadLabeledLatticeTypeProjectors();
static std::string GetName() { return "Delone"; }
static size_t GetCycles() { return m_ReductionCycleCount; }
private:
static int GenMaxMinKey(const D7& d);
static size_t FindRefl(const size_t key, const D7& random, std::set<size_t>& sr);
static std::vector<std::pair<std::string, MatS6> > PrivateLoadLabeledLatticeTypeProjectors();
static size_t m_ReductionCycleCount;
};
#endif // DELAUNAY_H