-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMatrixUtils.hpp
28 lines (23 loc) · 1.05 KB
/
MatrixUtils.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
#ifndef __MATRIX_UTILS_HPP__
#define __MATRIX_UTILS_HPP__
#include "Matrix.hpp"
/*
A simple Matrix class and Utils to manipulate matrices.
Author: Uğurcan Sarı, Oguz Oztoprak
Date : 20.11.2019
*/
namespace matrixUtilities
{
Matrix matrixSum( const Matrix& m1, const Matrix& m2);
Matrix matrixSumParallel( const Matrix& m1, const Matrix& m2, int numberOfThreads);
Matrix entryWiseProduct( const Matrix& m1, const Matrix& m2);
Matrix entryWiseProductParallel( const Matrix& m1, const Matrix& m2, int numberOfThreads);
void pad(Matrix & m,int step=1, double value=0.0);
void productThread(const Matrix & m1, const Matrix & m2, int begin, int end, int other_dim, Matrix & m3);
void sumThread(const Matrix & m1, const Matrix & m2, int begin, int end, int other_dim, Matrix & m3);
void lu_generator(const Matrix&, Matrix&, Matrix&);
void gauss_lu_solver(const Matrix&, const Matrix&, std::vector<double>&);
std::vector<double> solveByGaussElimination( const Matrix& matrix, const std::vector<double>& rhs);
//additional functions
}
#endif