Journal of Distributed Software Engineering and Architecture best-practices, anti-patterns and experiences curated from implementing enterprise and web-scale solutions
Matrix manipulation
When solving Boggle, Sudoku or some n-by-n board game or when doing Image analysis or Parallel Computing – it is often useful to be able to represent one-dimensional data structures in 2-dimension and vice-versa.
Simple formulae exists for doing this conversion, as illustrated below:
Converting from Row by Col 2-dimensional (2-index) format to a 1-by-(Row*Col) matrix with only one index:
What we start out with...what we end up with...actually its more like this!
Alok brings experience in engineering and architecting distributed software systems from over 20 years across industry and consulting. His posts focus on Systems Integration, API design, Microservices and Event driven systems, Modern Enterprise Architecture and other related topics
View all posts by alokmishra