Force a Dataset to be a Latin Hypercube

TABLE_LATINIZE is a FORTRAN90 program which allows the user to specify a file of data to be read in and adjusted to form a Latin hypercube.

The data in the file represents N points in M-dimensional space.

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.


table_latinize file.txt
reads the user's data file file.txt and writes a "latinized" version which will be called file.latin.txt.


The computer code and data files described and made available on this web page are distributed under the GNU LGPL license.


TABLE_LATINIZE is available in a C++ version and a FORTRAN90 version and a MATLAB version.

Related Data and Programs:

LATINIZE, a FORTRAN90 library which supplies the routines that calculate the Latinized data needed by TABLE_LATINIZE.

TABLE_IO, a FORTRAN90 library which supplies the routines used to read the TABLE file.

TABLE_QUALITY, a FORTRAN90 program which reads a file of points and computes the quality of dispersion.


  1. 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.
  2. Yuki Saka, Max Gunzburger, John Burkardt,
    Latinized, Improved LHS, and CVT Point Sets in Hypercubes,
    International Journal of Numerical Analysis and Modeling,
    Volume 4, Number 3-4, 2007, pages 729-743,

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:

You can go up one level to the FORTRAN90 source codes.

Last revised on 27 November 2006.