-
Notifications
You must be signed in to change notification settings - Fork 1
/
cbh_formulae.cpp
50 lines (40 loc) · 1.35 KB
/
cbh_formulae.cpp
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
#include "environment.h"
//************************************
// Method: cbh_formula
// FullName: cbh_formula
// Access: public
// Returns: int
// Qualifier:
//************************************
constexpr DEG WIDTH = 3;
constexpr DEG DEPTH = 3;
int cbh_formula()
{
using Environment = Environment<WIDTH,DEPTH>;
// give simplified names and access to the objects defined in Environment
using LIE = Environment::LIE;
using STENSOR = Environment::SHUFFLE_TENSOR;
using TENSOR = Environment::TENSOR;
using S = Environment::S;
using poly_t = Environment::poly_t;
auto k = Environment::K;
Environment env;
const auto& sbasis = env.sbasis;
auto glie1 = env.generic_lie(100);
auto glie2 = env.generic_lie(200);
auto L1 = env.maps_.l2t(glie1);
auto L2 = env.maps_.l2t(glie2);
auto logsig = env.maps_.t2l(log(exp(L1) * exp(L2)));
std::cout << "\n\n";
std::cout << "The generic lie elements:\n";
for (auto& x : env.lbasis.iterate_keys())
std::cout << LIE(x) << "\t"
<< glie1[x] << "\t" << glie2[x] << "\n";
std::cout << "\n\n";
std::cout << "\n\n";
std::cout << "The composition of two generic lie elements via cbh:\n";
for (auto& x : env.lbasis.iterate_keys())
std::cout << LIE(x) * logsig[x] << "\n";
std::cout << "\n\n";
return 0;
}