Skip to main content

One post tagged with "cpp"

View All Tags

Representing Matrix in C++

· 6 min read

Preview

Usually, we access elements of a 2D array, that is saved in a continuous memory like array[row*N+column]. Which is not as readable as array[row][column]. But a vector of vector has performance issues. This article shows an object-oriented way of representing a matrix as a C++ class without losing performance.