Mackey  V3.3
A C++ library for computing RO(G) graded homology
Additive.hpp
Go to the documentation of this file.
1 #pragma once
3 #include "Spaces/Point.hpp"
4 #include <iomanip>
7 
8 namespace mackey {
9 
11  template<typename group_t>
13  public:
14  typedef typename group_t::rank_t rank_t;
15  typedef typename group_t::diff_t diff_t;
16 
17  std::vector<int> minsphere;
18  std::vector<int> maxsphere;
19 
21  AdditiveStructure(const std::vector<int>& minsphere, const std::vector<int>& maxsphere);
22 
24  template<typename sphere_t>
25  std::vector<MackeyFunctor<rank_t>> getMackey(const sphere_t& sphere) const;
26 
28  template<typename sphere_t>
29  MackeyFunctor<rank_t> getMackey(int degree, const sphere_t& sphere) const;
30 
32  template<typename T>
33  void print_unique(T& stream);
34 
36  template<typename T>
37  void print_unknown(T& stream);
38 
40  const std::vector<MackeyFunctor<rank_t>>& identified();
41 
43  const std::vector<MackeyFunctor<rank_t>>& unknown();
44 
45  private:
46 
48  void identify();
49 
50  std::vector<int> true_unknowns;
51  std::vector<MackeyFunctor<rank_t>> uniqueMackeys;
52  std::vector<MackeyFunctor<rank_t>> unknownMackeys;
53  std::vector<std::vector<MackeyFunctor<rank_t>>> allMackeys;
54  std::vector<char> found_unknown;
55  void compute();
56  void identify_unique(MackeyFunctor<rank_t>&, bool);
57  void identify_unknown(int);
58 
59  void check_unique_and_assign(const MackeyFunctor<rank_t>&);
60  void check_unknown_and_assign(const std::vector<MackeyFunctor<rank_t>>&);
61 
62  template<typename _group>
63  friend std::ostream& operator<<(std::ostream& os, const AdditiveStructure<_group>&);
64  };
65 
68  template<typename group_t>
69  std::ostream& operator<<(std::ostream& os, const AdditiveStructure<group_t>& A);
70 }
71 
72 #include "impl/Additive.ipp"
Contains open MP macros that enable and control multithreading.
Contains the methods computing the RO(G) homology of a point.
The additive structure of the RO(G) homology of a point.
Definition: Additive.hpp:12
AdditiveStructure(const std::vector< int > &minsphere, const std::vector< int > &maxsphere)
Compute and identify given the range of our spheres.
void print_unknown(T &stream)
Print the unnamed Mackey functors that appear.
void print_unique(T &stream)
Print the unique Mackey functors that appear.
const std::vector< MackeyFunctor< rank_t > > & identified()
The identified Mackey functors (one from each.
std::vector< int > minsphere
The lower bound on the range of our spheres.
Definition: Additive.hpp:17
const std::vector< MackeyFunctor< rank_t > > & unknown()
The identified Mackey functors (one from each.
friend std::ostream & operator<<(std::ostream &os, const AdditiveStructure< _group > &)
group_t::rank_t rank_t
Definition: Additive.hpp:14
MackeyFunctor< rank_t > getMackey(int degree, const sphere_t &sphere) const
Retrieve the Mackey functor for the given degree.
std::vector< int > maxsphere
The upper bound on the range of our spheres.
Definition: Additive.hpp:18
std::vector< MackeyFunctor< rank_t > > getMackey(const sphere_t &sphere) const
Retrieve the Mackey functors in the homology of the given sphere.
group_t::diff_t diff_t
Definition: Additive.hpp:15
A Mackey Functor.
Definition: MackeyFunctor.hpp:18
Everything in this library is under this namespace.
Definition: Box.hpp:9
std::ostream & operator<<(std::ostream &, const Chains< rank_t, diff_t > &)
Prints chain complex.