11 #ifndef COXETER_TRIANGULATION_H_
12 #define COXETER_TRIANGULATION_H_
17 #include <boost/range/iterator_range.hpp>
18 #include <boost/graph/graph_traits.hpp>
19 #include <boost/graph/adjacency_list.hpp>
21 #include <Eigen/Eigenvalues>
22 #include <Eigen/Sparse>
25 #include <gudhi/Freudenthal_triangulation.h>
26 #include <gudhi/Permutahedral_representation.h>
30 namespace coxeter_triangulation {
43 template <
class Permutahedral_representation_ =
44 Permutahedral_representation<std::vector<int>, std::vector<std::vector<std::size_t> > > >
46 using Matrix = Eigen::MatrixXd;
48 Matrix root_matrix(
unsigned d) {
49 Matrix cartan(Matrix::Identity(d, d));
50 for (
unsigned i = 1; i < d; i++) {
51 cartan(i - 1, i) = -0.5;
52 cartan(i, i - 1) = -0.5;
54 Eigen::SelfAdjointEigenSolver<Matrix> saes(cartan);
55 Eigen::VectorXd sqrt_diag(d);
56 for (
unsigned i = 0; i < d; ++i) sqrt_diag(i) = std::sqrt(saes.eigenvalues()[i]);
58 Matrix lower(Matrix::Ones(d, d));
59 lower = lower.triangularView<Eigen::Lower>();
61 Matrix result = (lower * saes.eigenvectors() * sqrt_diag.asDiagonal()).inverse();
A class that stores Coxeter triangulation of type . This triangulation has the greatest simplex quali...
Definition: Coxeter_triangulation.h:45
Coxeter_triangulation(std::size_t dimension)
Constructor of Coxeter triangulation of a given dimension.
Definition: Coxeter_triangulation.h:69
A class that stores any affine transformation of the Freudenthal-Kuhn triangulation.
Definition: Freudenthal_triangulation.h:46
unsigned dimension() const
Dimension of the triangulation.
Definition: Freudenthal_triangulation.h:93
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14