There are available online lists of the number of all latin squares up to order 11, e.g.: https://oeis.org/A002860. For a permutation-based test of a latin square design, one option is to fit the model to all of the latin squares of the same order to derive the sampling distribution of the test statistic. Rather than generate all the latin squares for a given size each time a permutation test is performed, I could just read in the set of latin squares from disk.
Given the difficulty in determining how many latin squares there are of order $n$, I presume that there aren't simple algorithms for generating all latin squares of order $n$ either. I was wondering, given that some researchers have actually gone to the trouble of computing the number of latin squares up to order 11, if lists of these latin squares were publicly available in electronic form somewhere?
If not, are there reliable algorithms for generating all latin squares for order $n$, $n \in {3, 4, 5}$?
(I have a simple R implementation that will give these for $n = 3$ but I started to struggle at $n = 4$).
In the paper "How many structurally different latin squares order 5 do exist?" ( www.latinsquares5x5.wordpress.com ) all 192 structurally different latin squares of order 5 are described indirectly. The paper contains a list of all 192 structurally different squares, described after the 5 composing patterns (formed by its symbols), and the matching scheme of all possible (23) patterns of order 5. The only thing you have to do yourself is to assemble the patterns to a square. The paper shows how to do it. In the meantime (May 2017) mentioned paper has been completed with a new list (Addendum), in which all 192 squares are directly shown by means of one example each.