atlas  0.6
dynkin.h
Go to the documentation of this file.
1
5 /*
6  This is dynkin.h
7  Copyright (C) 2004,2005 Fokko du Cloux
8  Copyright (C) 2014 Marc van Leeuwen
9  part of the Atlas of Lie Groups and Representations
10
12 */
13
14 #ifndef DYNKIN_H /* guard against multiple inclusions */
15 #define DYNKIN_H
16
17 #include <utility> // for |std::pair|
18 #include <vector>
19
20 #include "../Atlas.h"
21
22 #include "bitset.h"
23 #include "permutations.h"
24
25 /******** type declarations *************************************************/
26
27 namespace atlas {
28
29 namespace dynkin {
30
31 /*
32  Since a Dynkin diagram will be a bitset (a subset of RANK_MAX elements, the
33  possible vertices 0, 1,...,RANK_MAX-1), an Edge is a pair of numbers
34  (between 0 and RANK_MAX-1), which numbers will fit in |unsigned char|
35  */
36 typedef std::pair<unsigned char, unsigned char> Edge;
37
38 // The Multiplicity of an Edge should be 1, 2, or 3.
39 typedef unsigned char Multiplicity;
40
41 class DynkinDiagram;
42
43 } // |namespace dynkin|
44
45 /******** function declarations *********************************************/
46
47 namespace dynkin {
48
49  // the following two functions are main entry points to this module
50  // find (semisimple) Lie type given by Cartan matrix
51  LieType Lie_type(const int_Matrix& cm);
52
53  // same, also set |pi| to permutation "straightening" each diagram component
54  LieType Lie_type(const int_Matrix& cm,
55  bool Bourbaki, // whether Bourbaki order is requested
56  bool check, // if true, be prepared for arbitrary |cm|
57  Permutation& pi);
58
60
61  Permutation normalize(const DynkinDiagram& d);
62
63  Permutation bourbaki(const DynkinDiagram& d);
64
65 }
66
67 /******** type definitions **************************************************/
68
69 namespace dynkin {
70 /*
71  A Dynkin diagram of at most RANK_MAX vertices.
72
73  The collection of vertices is represented as vector, each of whose elements
74  is a BitSet d_star[i], which regarded as a subset of the integers
75  0,1,...,RANK_MAX-1 gives the neighbours of vertex i. An Edge is a pair of
76  indices designating vertices. The map d_label attaches to certain Edges an
77  unsigned integer Multiplicity.
78 */
80
81  private:
82
83  // Adjacency relations: d_star[i].test(j): whether i and j are neighbors
84  std::vector<RankFlags> d_star;
85
86  // List of edges from longer to shorter node, with edge label (2 or 3)
87  std::vector<std::pair<Edge,Multiplicity> > d_downedge;
88
89  public:
90
91 // constructors and destructors
92
94  explicit DynkinDiagram(const int_Matrix& Cartan);
95  DynkinDiagram(const RankFlags& selection, const DynkinDiagram& d);
96
98
99 // accessors
100
101  unsigned int rank() const { return d_star.size(); }
102
103  bool isConnected() const;
104
105  bool isSimplyLaced() const { return edge_label()==1; }
106
107  LieType Lie_type() const;
108
109  int Cartan_entry(unsigned int i,unsigned int j) const;
110
111  Multiplicity edge_multiplicity(unsigned int i,unsigned int j) const
112  { return Cartan_entry(i,j)*Cartan_entry(j,i); }
113
114  RankFlags component(unsigned int i) const; // component containing vertex \$i\$
115
116  LieType normalise_components(Permutation& a, bool Bourbaki) const;
117
118  // these are mostly internal methods, but cannot be private in current setup
119  RankFlags extremities() const; // find nodes of degree 1 or 0
120  Edge labelled_edge() const; // find edge with label (not 1), assumed present
121  unsigned int fork_node() const; // find node of degree>2, or rank() if none
122  RankFlags star(unsigned int j) const { return d_star[j]; } // copies it
123
124 // manipulators: none (Dynkin diagrams are static objects)
125  private: // functions that are only meaningful for connected diagrams
126  Multiplicity edge_label() const; // (maximal) label of edge, or 1 if none
127  lietype::TypeLetter type_of_componenent() const;
128  SimpleLieType normalise_component(Permutation& pi, bool Bourbaki) const;
129 }; // |class DynkinDiagram|
130
131 } // |namespace dynkin|
132
133 } // |namespace atlas|
134
135 #endif
Definition: dynkin.h:79
char TypeLetter
Definition: Atlas.h:198
Permutation bourbaki(const DynkinDiagram &d)
Definition: dynkin.cpp:453
bool isSimplyLaced() const
Definition: dynkin.h:105
BitSet< constants::RANK_MAX > RankFlags
Definition: Atlas.h:60
LieType Lie_type(const int_Matrix &cm)
Definition: dynkin.cpp:394
std::vector< RankFlags > d_star
Definition: dynkin.h:84
unsigned int rank() const
Definition: dynkin.h:101
std::vector< RankFlags > RankFlagsList
Definition: Atlas.h:62
unsigned char Multiplicity
Definition: dynkin.h:39
std::vector< std::pair< Edge, Multiplicity > > d_downedge
Definition: dynkin.h:87
~DynkinDiagram()
Definition: dynkin.h:97
Permutation normalize(const DynkinDiagram &d)
Definition: dynkin.cpp:386
Multiplicity edge_multiplicity(unsigned int i, unsigned int j) const
Definition: dynkin.h:111
Definition: Atlas.h:38
Class definitions and function declarations for the BitSet class.
RankFlagsList components(const DynkinDiagram &d)
Definition: dynkin.cpp:363
DynkinDiagram()
Definition: dynkin.h:93
std::pair< unsigned char, unsigned char > Edge
Definition: dynkin.h:36
Definition: Atlas.h:81
RankFlags star(unsigned int j) const
Definition: dynkin.h:122