I have a problem with matrices / arrays, i cannot resolve. I have no idea how to start...
I have two 2D matrices and i want to overlap (mix?) one over the other, no matter what dimensions they have.
For example :
a = [ (1,2,3,4,5),
b = [ (0,0,0),
Now, if i want to put a over b, i get the result:
a over b = [
And b over a = [
I think this operation has a name in mathematics, but i don't know how to call it... and what to search for.
I tried 2 days to make a good algorithm and i gave up... Please keep in mind that my matrices are not square or rectangle. They can be very nasty to combine.
In fact, there is an undefined number of matrices i need to overlap, all this overlaping is in a strict order. I suppose that if i have the algorithm for 2 matrices, i can make a big "for" cicle and mix the next matrix over the previous result.
I need this overlap to happen AS FAST AS POSSIBLE. I need to overlap matrices with milions of elements, like 1600x1200.
Any help is welcome. Thank you very much.