LATIN_RANDOM_DATASET
Generate Latin Random Square Datasets
LATIN_RANDOM_DATASET
is a FORTRAN77 library which
creates a Latin Random Square dataset.
A Latin square, in M dimensional space, with N points,
can be thought of as being constructed by dividing each of the
M coordinate dimensions into N equal intervals.
The I-th coordinates of the N subsquares are defined
by assigning each possible value exactly once to one subsquare.
Such a set is called a Latin Square.
If we now select at random one point from each subsquare,
we have what we will term a "Latin Random Square".
Usage:
latin_random_dataset m n seed
where
-
m is the spatial dimension;
-
n is the number of points to generate;
-
seed is the initial seed value.
The data is written to the file latin_random_m_n.txt.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
LATIN_RANDOM_DATASET is available in
a C version and
a C++ version and
a FORTRAN77 version and
a FORTRAN90 version and
a MATLAB version.
Related Data and Programs:
LATIN_RANDOM,
a FORTRAN77 library which
computes a Latin Hypercube in M dimensions of N points, randomly
placed within their subsquares.
Reference:
-
Paul Bratley, Bennett Fox, Linus Schrage,
A Guide to Simulation,
Springer Verlag, pages 201-202, 1983.
-
CJ Colbourn, JH Dinitz,
CRC Handbook of Combinatorial Design,
CRC, 1996.
-
Bennett Fox,
Algorithm 647:
Implementation and Relative Efficiency of Quasirandom
Sequence Generators,
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,
Technometrics,
Volume 21, pages 239-245, 1979.
-
Albert Nijenhuis, Herbert Wilf,
Combinatorial Algorithms,
Academic Press, 1978, second edition,
ISBN 0-12-519260-6.
-
Herbert Ryser,
Combinatorial Mathematics,
Mathematical Association of America, 1963.
Source Code:
Examples and Data:
List of Routines:
-
MAIN is the main program for LATIN_RANDOM_DATASET.
-
MAIN_SUB is an auxilliary routine for the main program.
-
GET_SEED returns a seed for the random number generator.
-
GET_UNIT returns a free FORTRAN unit number.
-
I4_UNIFORM_AB returns a scaled pseudorandom I4 between A and B.
-
LATIN_RANDOM returns points in a Latin Random square.
-
PERM_UNIFORM selects a random permutation of N objects.
-
R8MAT_UNIFORM_01 returns a unit pseudorandom R8MAT.
-
R8MAT_WRITE writes a R8MAT file.
-
S_TO_I4 reads an I4 from a string.
-
TIMESTAMP prints out the current YMDHMS date as a timestamp.
You can go up one level to
the FORTRAN77 source codes.
Last revised on 13 November 2014.