Latin Random Squares in M dimensions
is a FORTRAN90 library which
makes Latin random squares.
A Latin square is a selection of one point from each row and
column of a square matrix or table. In M dimensions, the
corresponding item is a set of N points, where, in each dimension,
there is exactly one point whose coordinates are in a given
"column" or range of values. To emphasize the
use of higher dimensions, these objects are sometimes called
A Latin Random Square (I just made up this name) is a set of
N points, where one point is taken at random from each of the
subsquares of a Latin Square. These points may be regarded as
an M dimensional quasirandom pointset.
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
LATIN_RANDOM is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version and
a Python version.
Related Data and Programs:
a FORTRAN77 program which
computes a Latin Hypercube in M dimensions of N points, randomly
placed within their subsquares.
a FORTRAN77 library which
computes elements of a
sequence of pseudorandom normally distributed values.
a FORTRAN77 library which
computes elements of a uniform pseudorandom sequence.
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Springer Verlag, pages 201-202, 1983.
C J Colbourn and J H Dinitz,
CRC Handbook of Combinatorial Design,
Implementation and Relative Efficiency of Quasirandom
ACM Transactions on Mathematical Software,
Volume 12, Number 4, pages 362-376, 1986.
Michael McKay, William Conover, Richard Beckman,
A Comparison of Three Methods for Selecting Values of Input
Variables in the Analysis of Output From a Computer Code,
Volume 21, pages 239-245, 1979.
Albert Nijenhuis, Herbert Wilf,
Academic Press, 1978, second edition,
Mathematical Association of America, 1963.
Examples and Tests:
List of Routines:
GET_SEED returns a seed for the random number generator.
GET_UNIT returns a free FORTRAN unit number.
I4_UNIFORM returns a scaled pseudorandom I4.
LATIN_RANDOM returns points in a Latin Random square.
PERM_UNIFORM selects a random permutation of N objects.
R4_UNIFORM_01 returns a unit pseudorandom R4.
R8_UNIFORM_01 returns a unit pseudorandom R8.
R8MAT_WRITE writes an R8MAT file.
RANDOM_INITIALIZE initializes the FORTRAN 90 random number seed.
S_TO_I4 reads an integer value from a string.
TIMESTAMP prints the current YMDHMS date as a time stamp.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 14 December 2009.