Mackey  V3.3
A C++ library for computing RO(G) graded homology
Green.hpp
Go to the documentation of this file.
1 #pragma once
5 
8 
9 namespace mackey
10 {
11 
12  template <typename group_t>
13  typename group_t::rank_t multiply(const chains_t<group_t> &C, const chains_t<group_t> &D, int level, int degreeC, int degreeD, int selectC = 0, int selectD = 0);
14 
15  //forward declaration for Clang
16  namespace internal
17  {
18  template <typename>
19  class GreenCompute;
20  }
21 
23  template <typename group_t>
24  class Green
25  {
26  typedef typename group_t::rank_t rank_t;
27  typedef typename group_t::diff_t diff_t;
28 
29  public:
31  bool isZero;
33 
35  Green();
36 
38  Green(const Chains<rank_t, diff_t> &, const Chains<rank_t, diff_t> &, int, int, int);
39 
41  rank_t getNormalBasis(const rank_t &, const rank_t&) const;
42 
44  rank_t getNormalBasis(int i, const rank_t &b) const;
45 
47  rank_t getNormalBasis(const rank_t&a, int j) const;
48 
50  rank_t getNormalBasis(int i, int j) const;
51 
52  bool operator==(const Green<group_t> &) const;
53 
54  std::vector<rank_t> basis;
57 
58  private:
59 
61  int select(int, int) const;
62 
63  template <typename>
64  friend class internal::GreenCompute;
65  };
66 
67  namespace internal
68  {
69 
71  template <typename group_t>
73  {
74  typedef typename group_t::rank_t rank_t;
75  typedef typename group_t::diff_t diff_t;
76 
78  gen_t<rank_t, diff_t> gen, res_gen;
79  rank_t rank_level;
80  bool isZero;
81  ChainsLevelGen(const Chains<rank_t, diff_t> &C, int level, int degree);
82  ChainsLevelGen(const Chains<rank_t, diff_t> &C, int level, int degree, int selection);
83 
85  template <typename>
86  friend class GreenCompute;
87 
89  template <typename>
90  friend class MasseyCompute;
91  };
92 
94  template <typename rank_t, typename diff_t>
95  class ProductGen
96  {
97  gen_t<rank_t, diff_t> product;
98  int padright, padleft;
99  const Chains<rank_t, diff_t> &C, D;
100  int degreeC, degreeD;
101  ProductGen(const Chains<rank_t, diff_t> &C, const Chains<rank_t, diff_t> &D, int degreeC, int degreeD);
102 
103  void pad(const std::vector<int64_t> &detailedrank);
104 
105  void multiply(gen_t<rank_t, diff_t> gen1, gen_t<rank_t, diff_t> gen2);
106 
108  template <typename>
109  friend class GreenCompute;
110 
112  template <typename>
113  friend class MasseyCompute;
114  };
115 
117  template <typename group_t>
119  {
120  typedef typename group_t::rank_t rank_t;
121  typedef typename group_t::diff_t diff_t;
122 
123  Green<group_t> G;
124  gen_t<rank_t, diff_t> product;
125  const Chains<rank_t, diff_t> &C, D;
126  typename Homology<rank_t, diff_t>::Gens_t GenC, GenD;
127  rank_t rank_bottom, rank_level;
128  const int level, degreeC, degreeD;
129  Homology<rank_t, diff_t> H_Level;
130  ChainsLevelGen<group_t> C_Variables, D_Variables;
131  ProductGen<rank_t, diff_t> Restricted;
132 
134  GreenCompute(const Chains<rank_t, diff_t> &C, const Chains<rank_t, diff_t> &D, int level, int degreeC, int degreeD);
135 
137  void getGens();
139  void box();
141  void compute();
142 
144  template <typename>
145  friend class mackey::Green;
146  };
147  }
148 }
149 #include "impl/Green.ipp"
Contains the class mackey::Tensor.
Contains the classes mackey::IDGenerators and mackey::internal::IDGeneratorCompute
Contains the methods for transfering, restricting and Weyl-group-acting.
A chain complex.
Definition: Chains.hpp:31
The result of multiplying generators in a Green functor.
Definition: Green.hpp:25
AbelianGroup< rank_t > group
The homology group the product lives in.
Definition: Green.hpp:30
IDGenerators< rank_t > boxID
Identifies the generators of the homology group the product lives in.
Definition: Green.hpp:32
bool operator==(const Green< group_t > &) const
rank_t getNormalBasis(int i, const rank_t &b) const
Returns the (normalized) product of the selected generator with another element.
rank_t getNormalBasis(const rank_t &, const rank_t &) const
Returns the (normalized) product of the given two elements (not necessarily generators)
Green()
Sets to zero.
bool isZero
1 if the homology group the product lives in is 0.
Definition: Green.hpp:31
int first_number_selections
The number of selections of generators for the first factor.
Definition: Green.hpp:55
std::vector< rank_t > basis
For each selection of generators the product is a linear combination of generators in its degree.
Definition: Green.hpp:54
rank_t getNormalBasis(int i, int j) const
Returns the (normalized) product of the selected generators.
Green(const Chains< rank_t, diff_t > &, const Chains< rank_t, diff_t > &, int, int, int)
Computes the product of generators given chains, degrees and level.
int second_number_selections
The number of selections of generators for the second factor.
Definition: Green.hpp:56
rank_t getNormalBasis(const rank_t &a, int j) const
Returns the (normalized) product of the given element with the selected generator.
The Homology of a Junction.
Definition: Homology.hpp:19
diff_t_C Gens_t
The type of our matrix of generators.
Definition: Homology.hpp:27
Two levels of a Mackey functor, used for identification.
Definition: Identify.hpp:13
Computes the homology at given level, the generators and their restrictions.
Definition: Green.hpp:73
Computes the product of generators in a Green functor.
Definition: Green.hpp:119
Computes Massey products and their indeterminacy.
Definition: Massey.hpp:37
Computes the product of generators at the bottom level.
Definition: Green.hpp:96
Everything in this library is under this namespace.
Definition: Box.hpp:9
typename Homology< rank_t, diff_t >::gen_t gen_t
Type of generators in homology.
Definition: Aliases.hpp:72
group_t::rank_t multiply(const chains_t< group_t > &C, const chains_t< group_t > &D, int level, int degreeC, int degreeD, int selectC=0, int selectD=0)