summaryrefslogtreecommitdiffhomepage
path: root/opentrack
diff options
context:
space:
mode:
authorStanislaw Halik <sthalik@misaki.pl>2015-08-11 03:32:23 +0200
committerStanislaw Halik <sthalik@misaki.pl>2015-08-11 03:35:06 +0200
commit32c7d8370faca901162500a26f43a445f4f8e095 (patch)
treec9a3395c43a2187e4c764419d942edece0759ef9 /opentrack
parent573a78eeda6423ff4ce72dda9f00c366b20672d5 (diff)
simple-mat: open-code operator()(x, y) calls
Diffstat (limited to 'opentrack')
-rwxr-xr-x[-rw-r--r--]opentrack/simple-mat.hpp12
1 files changed, 6 insertions, 6 deletions
diff --git a/opentrack/simple-mat.hpp b/opentrack/simple-mat.hpp
index 7432e665..1d3b10e1 100644..100755
--- a/opentrack/simple-mat.hpp
+++ b/opentrack/simple-mat.hpp
@@ -90,7 +90,7 @@ struct Mat
num ret = 0;
constexpr int len = vector_len<R, S>::value;
for (int i = 0; i < len; i++)
- ret += operator()(i) * p2.operator ()(i);
+ ret += operator()(i) * p2(i);
return ret;
}
@@ -108,7 +108,7 @@ struct Mat
Mat<num, h_, w_> ret;
for (int j = 0; j < h_; j++)
for (int i = 0; i < w_; i++)
- ret(j, i) = this->operator ()(j, i) + other(j, i);
+ ret(j, i) = data[j][i] + other(j, i);
return ret;
}
@@ -117,7 +117,7 @@ struct Mat
Mat<num, h_, w_> ret;
for (int j = 0; j < h_; j++)
for (int i = 0; i < w_; i++)
- ret(j, i) = this->operator ()(j, i) - other(j, i);
+ ret(j, i) = data[j][i] - other(j, i);
return ret;
}
@@ -126,7 +126,7 @@ struct Mat
Mat<num, h_, w_> ret;
for (int j = 0; j < h_; j++)
for (int i = 0; i < w_; i++)
- ret(j, i) = this->operator ()(j, i) + other;
+ ret(j, i) = data[j][i] + other;
return ret;
}
@@ -135,7 +135,7 @@ struct Mat
Mat<num, h_, w_> ret;
for (int j = 0; j < h_; j++)
for (int i = 0; i < w_; i++)
- ret(j, i) = this->operator ()(j, i) - other;
+ ret(j, i) = data[j][i] - other;
return ret;
}
@@ -144,7 +144,7 @@ struct Mat
Mat<num, h_, w_> ret;
for (int j = 0; j < h_; j++)
for (int i = 0; i < w_; i++)
- ret(j, i) = operator()(j, i) * other;
+ ret(j, i) = data[j][i] * other;
return ret;
}