Welcome to mirror list, hosted at ThFree Co, Russian Federation.

matrix_traversal.hpp « coding - github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 8ac53207ca64bc63f2810a2ba0dc05f5ba5010a1 (plain)
1
2
3
4
5
6
#pragma once

template <typename T> T TraverseMatrixInRowOrder(T n, T i, T j, bool is_back)
{
  return (i * n + j) * 2 + (is_back ? 1 : 0);
}