LATINIZE
Force a Dataset to be a Latin Hypercube
LATINIZE is a FORTRAN90 library
which adjusts an M dimensional dataset of N points
so that it forms a Latin hypercube.
The algorithm is actually very simple. In each spatial dimension,
the point coordinates are sorted, and then replaced by the appropriate
values for a Latin hypercube. In particular, if there are four points,
then in every coordinate, the four points will be assigned values
of 1/8, 3/8, 5/8 and 7/8 (in some order). The hope is that if
the initial dataset has some nice dispersion property, then the
resulting adjusted dataset will inherit some of this dispersion as
well; in particular, more dispersion than typically seen in an
arbitrary Latin hypercube.
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Related Data and Programs:
LATIN_CENTER
is a FORTRAN90 library of routines for Latin Square datasets
choosing the center of each square.
LATIN_EDGE
is a FORTRAN90 library of routines for Latin Square datasets
choosing the edge of each square.
LATIN_RANDOM
is a FORTRAN90 library of routines for Latin Square datasets
choosing a random point of each square.
LATINIZE is available in
a C++ version and
a FORTRAN90 version and
a MATLAB version.
TABLE
is a file format which
is used to store the input and output files
used by the program.
TABLE_LATINIZE
is an interactive FORTRAN90 program which allows the
user to name the input data file on the command line.
Reference:
-
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.
Source Code:
Examples and Tests:
CVT_02_00010 is a set of 10 CVT points in 2D:
CVT_03_00007 is a set of 7 CVT points in 3D:
CVT_03_00056 is a set of 56 CVT points in 3D:
CVT_07_00100 is a set of 100 CVT points in 7D:
List of Routines:
-
CH_CAP capitalizes a single character.
-
CH_EQI is a case insensitive comparison of two characters for equality.
-
CH_TO_DIGIT returns the integer value of a base 10 digit.
-
DTABLE_DATA_READ reads real table data from a file.
-
DTABLE_DATA_WRITE writes a table dataset to a file.
-
DTABLE_HEADER_READ reads header data from a file.
-
DTABLE_HEADER_WRITE writes the table header data to a file.
-
DTABLE_LATINIZE "Latinizes" a real table dataset.
-
DTABLE_LATINIZED_WRITE writes a real latinized table dataset to a file.
-
FILE_COLUMN_COUNT counts the number of columns in the first line of a file.
-
FILE_NAME_EXT_GET determines the "extension" of a file name.
-
FILE_NAME_EXT_SWAP replaces the current "extension" of a file name.
-
FILE_ROW_COUNT counts the number of row records in a file.
-
GET_UNIT returns a free FORTRAN unit number.
-
R8MAT_PRINT_SOME prints some of a DMAT.
-
R8MAT_TRANSPOSE_PRINT prints a real matrix, transposed.
-
R8MAT_TRANSPOSE_PRINT_SOME prints some of a real matrix, transposed.
-
R8VEC_SORT_HEAP_INDEX_A does an indexed heap ascending sort of a real vector.
-
S_BLANK_DELETE removes blanks from a string, left justifying the remainder.
-
S_INDEX_LAST finds the LAST occurrence of a given substring.
-
S_TO_R8 reads an R8 from a string.
-
S_TO_R8VEC reads an R8VEC from a string.
-
S_WORD_COUNT counts the number of "words" in a string.
-
TIMESTAMP prints the current YMDHMS date as a time stamp.
-
TIMESTRING writes the current YMDHMS date into a string.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 12 November 2006.