OpenTwin 0.1
OpenTwin
 
Loading...
Searching...
No Matches
MatrixFactory.hpp
Go to the documentation of this file.
1#pragma once
2#include "MatrixFactory.h"
3
4
5template<class T>
6inline Matrix<T> * MatrixFactory<T>::CreateRowWiseOptimized(int64_t rows, int64_t columns, std::vector<std::vector<T>> columnWiseData)
7{
9 for (int col = 0; col < columns;col++)
10 {
11 for (int row = 0; row < rows; row++)
12 {
13 temp->SetValue(row, col, columnWiseData[col][row]);
14 }
15 }
16
17 return temp;
18}
19
20template<class T>
21inline Matrix<T> * MatrixFactory<T>::CreateRowWiseOptimizedEmpty(int64_t rows, int64_t columns)
22{
24}
25
26template<class T>
27inline Matrix<T> * MatrixFactory<T>::CreateColumnWiseOptimized(int64_t rows, int64_t columns, std::vector<std::vector<T>> columnWiseData)
28{
30 for (int col = 0; col < columns;col++)
31 {
32 for (int row = 0; row < rows; row++)
33 {
34 temp->SetValue(row, col, columnWiseData[col][row]);
35 }
36 }
37
38 return temp;
39}
40
41template<class T>
46
static Matrix< T > * CreateRowWiseOptimized(int64_t rows, int64_t columns, std::vector< std::vector< T > > columnWiseData)
Definition MatrixFactory.hpp:6
static Matrix< T > * CreateRowWiseOptimizedEmpty(int64_t rows, int64_t columns)
Definition MatrixFactory.hpp:21
static Matrix< T > * CreateColumnWiseOptimizedEmpty(int64_t rows, int64_t columns)
Definition MatrixFactory.hpp:42
static Matrix< T > * CreateColumnWiseOptimized(int64_t rows, int64_t columns, std::vector< std::vector< T > > columnWiseData)
Definition MatrixFactory.hpp:27
Definition Matrix.h:13