An application I\'m working on requires a matrix of random numbers. The matrix can grow in any direction at any time, and isn\'t always full. (I\'ll probably end up re-imple
A pseudo-random number generator is essentially a function that deterministically calculates a successor for a given value.
You could invent a simple algorithm that calculates a value from its neighbours. If a neighbour doesn't have a value yet, calculate its value from its respective neighbours first.
Something like this:
Example with successor(n) = n+1 to calculate value(2,4):
\ x 0 1 2 y +------------------- 0 | 627 628 629 1 | 630 2 | 631 3 | 632 4 | 633
This example algorithm is obviously not very good, but you get the idea.