-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMatrix_Multiplication.hpp
46 lines (40 loc) · 1.11 KB
/
Matrix_Multiplication.hpp
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#ifndef __Matrix_Multiplication__
#define __Matrix_Multiplication__
#include <iostream>
#include <vector>
// uncomment the typdefs when testing the integral weights separately
typedef double decimal;
typedef int integer;
//typedef Number decimal;
//typedef Index integer;
template<class decimal, class integer>
std::vector<decimal> multiply_M_V
(
const std::vector<std::vector<decimal > >& A,
const std::vector<decimal >& B,
integer sz
);
template<class decimal, class integer>
std::vector<decimal> multiply_M_V
(
const std::vector<std::vector<decimal > >& A,
const std::vector<decimal >& B,
integer sz1,
integer sz2
);
template<class decimal, class integer>
decimal multiply_V_V
(
const std::vector<decimal>& A,
const std::vector<decimal>& B,
integer sz
);
template<class decimal, class integer>
std::vector<std::vector<decimal > > multiply_M_M
(
const std::vector<std::vector<decimal > >& D, // matrix D
const std::vector<decimal >& X, // vector X
integer N, // length of vector X
integer M
);
#endif