1 #ifndef _GLUCAT_GENERATION_IMP_H
2 #define _GLUCAT_GENERATION_IMP_H
38 namespace glucat {
namespace gen
47 template<
class Matrix_T >
48 generator_table<Matrix_T>&
51 {
static generator_table<Matrix_T> g;
return g;}
55 template<
class Matrix_T >
67 return &(gen_vector(p, q)[q]);
72 return &(gen_vector(super_p, super_q)[super_q]);
77 template<
class Matrix_T >
78 const std::vector<Matrix_T>&
86 if (this->find(sig) == this->end())
92 gen_from_pp4_qm4(gen_vector(p+4, q-4), sig);
95 gen_from_pm4_qp4(gen_vector(p-4, q+4), sig);
98 std::vector<Matrix_T> result(1, matrix::unit<Matrix_T>(1));
99 this->insert(make_pair(sig, result));
103 gen_from_pm1_qm1(gen_vector(p-1, q-1), sig);
108 gen_from_pp4_qm4(gen_vector(p+4, q-4), sig);
111 gen_from_pm4_qp4(gen_vector(p-4, q+4), sig);
114 gen_from_qp1_pm1(gen_vector(q+1, p-1), sig);
124 template<
class Matrix_T >
129 typedef typename Matrix_T::size_type matrix_index_t;
141 const int new_size = old.size() + 2;
142 const matrix_index_t old_dim = old[0].size1();
143 const Matrix_T& eye = matrix::unit<Matrix_T>(old_dim);
145 std::vector<Matrix_T> result(new_size);
156 this->insert(make_pair(sig, result));
161 template<
class Matrix_T >
173 const int old_size = old.size();
174 std::vector<Matrix_T> result(old_size);
185 result[k-4] = old[k];
187 this->insert(make_pair(sig, result));
192 template<
class Matrix_T >
197 const int old_size = old.size();
198 Matrix_T h = old[old_size-1];
205 std::vector<Matrix_T> result(old_size);
215 result[k] = old[k-4];
217 this->insert(make_pair(sig, result));
222 template<
class Matrix_T >
227 const int old_size = old.size();
228 const Matrix_T& a = old[old_size-1];
229 std::vector<Matrix_T> result(old_size);
236 result[old_size-1] = a;
239 this->insert(make_pair(sig, result));
243 #endif // _GLUCAT_GENERATION_IMP_H