38# ifndef __BITPIT_MULTIPLICATION_HPP__
39# define __BITPIT_MULTIPLICATION_HPP__
51# include "bitpit_operators.hpp"
53# include "matrix_utilities.hpp"
60namespace linearalgebra{
65 const std::vector< std::vector< T > > &,
66 std::vector< std::vector< T > > &
69template <
class T,
size_t m,
size_t n>
72 const std::array< std::array< T, n >, m > &,
73 std::array< std::array< T, n >, m > &
78 const std::vector< std::vector< T > > &,
80 std::vector< std::vector< T > > &
83template <
class T,
size_t m,
size_t n>
85 const std::array< std::array< T, n >, m > &,
87 std::array< std::array< T, n >, m > &
92 const std::vector< T > &,
93 const std::vector< std::vector< T > > &,
97template <
class T,
size_t m,
size_t n>
99 const std::array< T, m > &,
100 const std::array< std::array < T, n >, m > &,
106 const std::vector< std::vector< T > > &,
107 const std::vector< T > &,
111template <
class T,
size_t m,
size_t n>
113 const std::array< std::array < T, n >, m > &,
114 const std::array< T, n > &,
120 const std::vector< std::vector< T > > &,
121 const std::vector< std::vector< T > > &,
122 std::vector< std::vector< T > > &
125template <
class T,
size_t m,
size_t n,
size_t l>
127 const std::array< std::array< T, n >, m > &,
128 const std::array< std::array< T, l >, n > &,
129 std::array< std::array< T, l >, m > &
132template <
class T,
size_t d1,
size_t d2,
size_t d3>
133std::array< std::array<T, d2> , d1>
matmul(
134 const std::array< std::array<T, d3>, d1> &,
135 const std::array< std::array<T, d2>, d3> &
139std::vector< std::vector<T> >
matmul(
140 const std::vector< std::vector<T> > &,
141 const std::vector< std::vector<T> > &
146 const std::vector<T> &,
147 const std::vector< std::vector<T> > &
152 const std::vector< std::vector<T> > &,
153 const std::vector<T> &
156template <
class T,
size_t d1,
size_t d2>
157std::array< std::array<T, d2> , d1>
matmulDiag(
158 const std::array<T, d1> &,
159 const std::array< std::array<T, d2>, d1> &
162template <
class T,
size_t d1,
size_t d2>
163std::array< std::array<T, d2> , d1>
matmulDiag(
164 const std::array< std::array<T, d2>, d1> & ,
165 const std::array<T, d2> &
171 const std::vector< std::vector<T>> &,
172 const std::vector<T> &
175template <
class T,
size_t d1,
size_t d2>
177 const std::array< std::array<T, d2>, d1> &,
178 const std::array<T, d2> &
184 std::vector<T>
const &,
185 std::vector<T>
const &
188template <
class T,
size_t n,
size_t m>
190 std::array<T, n>
const &,
191 std::array<T, m>
const &
201# include "multiplication.tpp"
std::vector< std::vector< T > > tensorProduct(std::vector< T > const &, std::vector< T > const &)
void matmul(T, const std::vector< std::vector< T > > &, std::vector< std::vector< T > > &)
std::vector< std::vector< T > > matmulDiag(const std::vector< T > &, const std::vector< std::vector< T > > &)