calculateDistMatrixFromBoard calculates the distance matrix when the field is divided in a matrix shape (rows and columns). This board could have different number of columns for each row.
The dimension of obtained squared matrix is given by the square of the maximumn dimension of the original matrix. In the previous example, the matrix will have a size of (36,36).
is a 2D data structure.
distM the distance between each cell.
1 2 3
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.