1 #ifndef _GLUCAT_MATRIX_MULTI_H
2 #define _GLUCAT_MATRIX_MULTI_H
40 #include <boost/numeric/ublas/fwd.hpp>
49 namespace ublas = boost::numeric::ublas;
53 template<
typename Scalar_T, const index_t LO, const index_t HI >
56 template<
typename Scalar_T, const index_t LO, const index_t HI >
60 template<
typename Scalar_T, const index_t LO, const index_t HI >
61 const matrix_multi<Scalar_T,LO,HI>
62 operator* (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
65 template<
typename Scalar_T, const index_t LO, const index_t HI >
66 const matrix_multi<Scalar_T,LO,HI>
67 operator^ (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
70 template<
typename Scalar_T, const index_t LO, const index_t HI >
71 const matrix_multi<Scalar_T,LO,HI>
72 operator& (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
75 template<
typename Scalar_T, const index_t LO, const index_t HI >
76 const matrix_multi<Scalar_T,LO,HI>
77 operator% (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
80 template<
typename Scalar_T, const index_t LO, const index_t HI >
82 star(
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
85 template<
typename Scalar_T, const index_t LO, const index_t HI >
86 const matrix_multi<Scalar_T,LO,HI>
87 operator/ (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
90 template<
typename Scalar_T, const index_t LO, const index_t HI >
91 const matrix_multi<Scalar_T,LO,HI>
92 operator| (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs);
95 template<
typename Scalar_T, const index_t LO, const index_t HI >
97 operator>> (std::istream& s, matrix_multi<Scalar_T,LO,HI>& val);
100 template<
typename Scalar_T, const index_t LO, const index_t HI >
102 operator<< (std::ostream& os,
const matrix_multi<Scalar_T,LO,HI>& val);
105 template<
typename Scalar_T, const index_t LO, const index_t HI >
106 const index_set<LO,HI>
107 reframe (
const matrix_multi<Scalar_T,LO,HI>& lhs,
const matrix_multi<Scalar_T,LO,HI>& rhs,
108 matrix_multi<Scalar_T,LO,HI>& lhs_reframed, matrix_multi<Scalar_T,LO,HI>& rhs_reframed);
111 template<
typename Scalar_T, const index_t LO, const index_t HI >
112 const matrix_multi<Scalar_T,LO,HI>
113 sqrt(
const matrix_multi<Scalar_T,LO,HI>& val,
const matrix_multi<Scalar_T,LO,HI>&
i,
bool prechecked);
116 template<
typename Scalar_T, const index_t LO, const index_t HI >
117 const matrix_multi<Scalar_T,LO,HI>
118 matrix_sqrt(
const matrix_multi<Scalar_T,LO,HI>& val,
const matrix_multi<Scalar_T,LO,HI>&
i);
121 template<
typename Scalar_T, const index_t LO, const index_t HI >
122 const matrix_multi<Scalar_T,LO,HI>
123 log(
const matrix_multi<Scalar_T,LO,HI>& val,
const matrix_multi<Scalar_T,LO,HI>&
i,
bool prechecked);
126 template<
typename Scalar_T, const index_t LO, const index_t HI >
127 const matrix_multi<Scalar_T,LO,HI>
128 matrix_log(
const matrix_multi<Scalar_T,LO,HI>& val,
const matrix_multi<Scalar_T,LO,HI>&
i);
131 template<
typename Scalar_T =
double, const index_t LO = DEFAULT_LO, const index_t HI = DEFAULT_HI >
133 public clifford_algebra< Scalar_T, index_set<LO,HI>, matrix_multi<Scalar_T,LO,HI> >
140 typedef std::pair<const index_set_t, Scalar_T>
term_t;
141 typedef std::vector<Scalar_T>
vector_t;
142 typedef error<multivector_t>
error_t;
144 template<
typename Other_Scalar_T, const index_t Other_LO, const index_t Other_HI >
146 template<
typename Other_Scalar_T, const index_t Other_LO, const index_t Other_HI >
151 typedef ublas::compressed_matrix< int, orientation_t >
153 #if defined(_GLUCAT_USE_DENSE_MATRICES)
154 typedef ublas::matrix< Scalar_T, orientation_t >
matrix_t;
156 typedef ublas::compressed_matrix< Scalar_T, orientation_t >
169 template<
typename Other_Scalar_T >
172 template<
typename Other_Scalar_T >
177 const index_set_t frm,
const bool prechecked =
false);
182 const index_set_t frm,
const bool prechecked =
false);
189 const index_set_t frm,
const bool prechecked =
false);
200 const index_set_t frm,
const bool prechecked =
false)
201 { *
this =
matrix_multi(std::string(str), frm, prechecked); };
203 template<
typename Other_Scalar_T >
204 matrix_multi(
const framed_multi<Other_Scalar_T,LO,HI>& val);
206 template<
typename Other_Scalar_T >
207 matrix_multi(
const framed_multi<Other_Scalar_T,LO,HI>& val,
208 const index_set_t frm,
const bool prechecked =
false);
212 template<
typename Other_Scalar_T >
217 template<
typename Matrix_T >
255 operator<< <>(std::ostream& os,
const term_t& term);
257 template<
typename Other_Scalar_T, const index_t Other_LO, const index_t Other_HI >
261 template<
typename Other_Scalar_T, const index_t Other_LO, const index_t Other_HI >
264 template<
typename Other_Scalar_T, const index_t Other_LO, const index_t Other_HI >
283 template<
typename Scalar_T, const index_t LO, const index_t HI >
292 template <
typename Scalar_T, const glucat::index_t LO, const glucat::index_t HI>
293 struct numeric_limits<
glucat::matrix_multi<Scalar_T,LO,HI> > :
294 public numeric_limits<Scalar_T>
297 #endif // _GLUCAT_MATRIX_MULTI_H