-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMat2D.h
45 lines (37 loc) · 851 Bytes
/
Mat2D.h
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
45
//
// Created by srigun on 8/19/20.
//
#ifndef TDD__MAT2D_H_
#define TDD__MAT2D_H_
#include <functional>
#include <vector>
/*
template<typename T>
class OutputType {
private:
std::vector<T> output_val_;
public:
explicit OutputType(const Mat2D<T>& mat2d) : output_val_(mat2d){}
};
*/
template <typename T>
class Mat2D {
private:
std::vector<T> pixel_;
std::size_t rows_;
std::size_t cols_;
public:
Mat2D(const std::vector<T> &pixel_, std::size_t rows, std::size_t cols) {
this->pixel_ = pixel_;
this->rows_ = rows;
this->cols_ = cols;
}
//TODO fix it to return appropriate type
std::vector<T> filter(Mat2D<T> kernel);
};
template<typename T>
using FunctionPtr = std::function < std::vector<T> (Mat2D<T>)>;
// Client code:
//OutputType o;
//o.add((OutputType)conv);
#endif // TDD__MAT2D_H_