I have a question regarding matrices for a personal project of mine.
I have a large matrix that needs to be split into smaller matrices. I know its dimensions are X and Y. I know that the max amount of elements for each child matrix is E. (EX: A 5x5 matrix has 25 elements).
I want to find where to split the matrix into smaller matrices so that I have as few children matrices as possible and none of them go over element limit E.
The final constraint is that the children need to vertically line up.
1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 3 3 3 3 4 4 4 4 3 3 3 3 4 4 4 4 3 3 3 3 4 4 4 4 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 1 1 1 1 2 2 2 2 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3 3
So In that example, the first matrix is good because the children line up into the columns, however, the second is not because it breaks up the columns.
Any guidance is greatly appreciated!
Thanks!