aboutsummaryrefslogtreecommitdiffstats
path: root/util/draft/matrix.h
diff options
context:
space:
mode:
authoralzobnin <alzobnin@yandex-team.ru>2022-02-10 16:46:50 +0300
committerDaniil Cherednik <dcherednik@yandex-team.ru>2022-02-10 16:46:50 +0300
commitc9317148cc3e9f1b0bc0ce95172f47e099f2c554 (patch)
tree1e426d905ba97d8c281c5cc53389faaced3832c7 /util/draft/matrix.h
parent6170310e8721e225f64ddabf7a7358253d7a1249 (diff)
downloadydb-c9317148cc3e9f1b0bc0ce95172f47e099f2c554.tar.gz
Restoring authorship annotation for <alzobnin@yandex-team.ru>. Commit 1 of 2.
Diffstat (limited to 'util/draft/matrix.h')
-rw-r--r--util/draft/matrix.h20
1 files changed, 10 insertions, 10 deletions
diff --git a/util/draft/matrix.h b/util/draft/matrix.h
index 154d00b35e..82fc513606 100644
--- a/util/draft/matrix.h
+++ b/util/draft/matrix.h
@@ -18,7 +18,7 @@ public:
{
}
- TMatrix(size_t m, size_t n)
+ TMatrix(size_t m, size_t n)
: Buf(new T[m * n])
, Arr(Buf)
, M(m)
@@ -27,7 +27,7 @@ public:
{
}
- TMatrix(size_t m, size_t n, T* buf)
+ TMatrix(size_t m, size_t n, T* buf)
: Buf(nullptr)
, Arr(buf)
, M(m)
@@ -46,7 +46,7 @@ public:
M = N = 0;
}
- void ReDim(size_t m, size_t n) {
+ void ReDim(size_t m, size_t n) {
Y_ASSERT(m >= 1 && n >= 1);
size_t newSize = m * n;
if (newSize > BufSize) {
@@ -59,34 +59,34 @@ public:
N = n;
}
- size_t Width() const {
+ size_t Width() const {
return N;
}
- size_t Height() const {
+ size_t Height() const {
return M;
}
// Access element matrix[i][j]
- T* operator[](size_t i) {
+ T* operator[](size_t i) {
Y_ASSERT(i >= 0 && i < M);
return Arr + i * N;
}
// Access element matrix[i][j]
- const T* operator[](size_t i) const {
+ const T* operator[](size_t i) const {
Y_ASSERT(i >= 0 && i < M);
return Arr + i * N;
}
// Access element matrix(i, j)
- T& operator()(size_t i, size_t j) {
+ T& operator()(size_t i, size_t j) {
Y_ASSERT(i >= 0 && i < M && j >= 0 && j < N);
return Arr[i * N + j];
}
// Access element matrix(i, j)
- const T& operator()(size_t i, size_t j) const {
+ const T& operator()(size_t i, size_t j) const {
Y_ASSERT(i >= 0 && i < M && j >= 0 && j < N);
return Arr[i * N + j];
}
@@ -103,6 +103,6 @@ public:
private:
T* Buf;
T* Arr;
- size_t M, N;
+ size_t M, N;
size_t BufSize;
};