atlas  0.6
kgp.h
Go to the documentation of this file.
1 /*
2  This is kgp.h
3 
4  Copyright (C) 2011 Scott Crofts
5  part of the Atlas of Lie Groups and Representations
6 
7  For license information see the LICENSE file
8 */
9 
10 #ifndef KGP_H
11 #define KGP_H
12 
13 #include "kgb.h"
14 #include "bruhat.h"
15 #include <queue>
16 #include "sl_list.h"
17 
18 namespace atlas {
19 namespace kgb {
20 
21 class KGP_orbit
22 {
23  std::vector<KGBElt> data;
24 
25 public:
26  // allow KGP class to build orbits
27  friend class KGP;
28 
29  // Constructor
30  KGP_orbit() {};
31 
32  // print function
33  std::ostream& print(std::ostream& strm) const;
34 
35  // comparison based on dimension (i.e. length of open orbit)
36  bool operator< (const KGP_orbit &elt) const { return (open() < elt.open()); }
37 
38  // accessors
39  KGBElt open() const { return data.back(); }
40  size_t size() const { return data.size(); }
41 
42 };
43 
44 class KGP
45 {
46  // link to KGB graph
47  const KGB& kgb;
48 
49  // link to the bruhat order on kgb
51 
52  // table to hold KGP orbit numbers for each KGB orbit
53  std::vector<KGPElt> kgptable;
54 
55  // list of KGP orbits
56  std::vector<KGP_orbit> data;
57 
58  // hasse diagram for closure relations
59  // (pointer since there is no default constructor)
61 
62  // maximum orbit size - needed for print formatting
63  size_t msize;
64 
65 public:
66  // Constructor
68 
69  // Destructor (free memory if necessary)
70  ~KGP() { if (bruhat != NULL) delete bruhat; }
71 
72  // compute (strong) closure order on the KGP orbits
73  void fillClosure();
74 
75  // print functions
76  std::ostream& print(std::ostream& strm) const;
77  std::ostream& printClosure(std::ostream& strm) const;
78 
79  // make a '.dot' file that can be processed by the 'dot' program
80  // see www.graphviz.org for more info
81  // (not const since could cause the closure order to be filled)
82  void makeDotFile(std::ostream& strm);
83 
84  // accessors
85  size_t size() const { return data.size(); }
86 
87 private:
88  // helper function - removes redundant edges from a closure relation
89  typedef std::queue<KGPElt,containers::sl_list<KGPElt> > KGP_queue;
90  void reduce(KGP_queue& q, std::vector<bool>& closure,
91  std::vector<set::EltList>& hasse, KGPElt minelt);
92 
93 }; // |class KGP|
94 
95 
96 } // |namespace kgb|
97 } // |namespace atlas|
98 
99 #endif
100 
101 
102 
Class definition and function declarations for the class BruhatOrder.
Definition: realredgp.h:41
void reduce(reduction *rule)
Definition: cweave.c:2261
BitSet< constants::RANK_MAX > RankFlags
Definition: Atlas.h:60
Definition: kgp.h:21
KGBElt open() const
Definition: kgp.h:39
Class definition and function declarations for the class KGB representing orbits of K on G/B...
Definition: kgp.h:44
size_t size() const
Definition: kgp.h:40
Intended to represent the Bruhat order on K orbits on G/B, or on a block of representations.
Definition: bruhat.h:37
Definition: kgb.h:288
void generators(GrpNbrList &gen, const bitmap::BitMap &B, const FiniteAbelianGroup &A)
Definition: abelian.cpp:550
unsigned int KGBElt
Definition: Atlas.h:339
std::ostream & print(std::ostream &strm) const
Definition: kgp.cpp:27
const KGB & kgb
Definition: kgp.h:47
size_t size() const
Definition: kgp.h:85
size_t msize
Definition: kgp.h:63
friend class KGP
Definition: kgp.h:27
void makeDotFile(std::ostream &strm, const KGB &kgb, const BruhatOrder &bruhat)
Definition: kgb_io.cpp:209
bool operator<(const KGP_orbit &elt) const
Definition: kgp.h:36
Definition: Atlas.h:38
std::vector< KGBElt > data
Definition: kgp.h:23
KGP_orbit()
Definition: kgp.h:30
std::vector< KGPElt > kgptable
Definition: kgp.h:53
const bruhat::BruhatOrder & kgborder
Definition: kgp.h:50
bruhat::BruhatOrder * bruhat
Definition: kgp.h:60
~KGP()
Definition: kgp.h:70
std::queue< KGPElt, containers::sl_list< KGPElt > > KGP_queue
Definition: kgp.h:89
unsigned int KGPElt
Definition: Atlas.h:349
std::vector< KGP_orbit > data
Definition: kgp.h:56