-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathFilter.cpp
More file actions
47 lines (40 loc) · 717 Bytes
/
Filter.cpp
File metadata and controls
47 lines (40 loc) · 717 Bytes
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
46
47
#include "Filter.h"
#include <omp.h>
#include <iostream>
Filter::Filter(int _dim)
{
divisor = 1;
dim = _dim;
data = new int[dim * dim];
}
// int Filter::get(int r, int c)
// {
// return data[ r * dim + c ];
// }
// void Filter::set(int r, int c, int value)
// {
// data[ r * dim + c ] = value;
// }
// int Filter::getDivisor()
// {
// return divisor;
// }
// void Filter::setDivisor(int value)
// {
// divisor = value;
// }
// int Filter::getSize()
// {
// return dim;
// }
void Filter::info()
{
cout << "Filter is.." << endl;
for (int col = 0; col < dim; col++) {
for (int row = 0; row < dim; row++) {
int v = get(row, col);
cout << v << " ";
}
cout << endl;
}
}