DIAPHONY
the "Diaphony" (dispersion)
of an Mdimensional Pointset
DIAPHONY
is a FORTRAN90 program which
computes the "diaphony" of an Mdimensional pointset.
The "diaphony" of an Mdimensional pointset is a numeric measure
of the uniformity of the dispersion of the points throughout
the unit hypercube.
Regarded as a random variable itself, the diaphony of a set of N points
has an expected value of 1/sqrt(N).
For the Halton datasets in 2D, 7D and 16D, here is the table
of the number of points versus the diaphony:
Diaphony(M,N)  M=2D  M=7D  M=16D 
1/Sqrt(N) 
N=10  0.246  0.316 
0.316  0.316 
N=100  0.043  0.099 
0.099  0.100 
N=1000  0.006  0.031 
0.031  0.031 
N=10000  0.001  0.009 
0.009  0.010 
Licensing:
The computer code and data files described and made available on this web page
are distributed under
the GNU LGPL license.
Languages:
DIAPHONY 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:
STAR_DISCREPANCY,
a C++ program which
reads a TABLE file of points (presumed to lie in the
unit hypercube) and computes bounds on the star discrepancy,
a measure of dispersion, by Eric Thiemard.
TABLE_LATINIZE,
a FORTRAN90 program which
reads a file of
points and creates a "latinized" version by adjusting the data.
TABLE_QUALITY,
a FORTRAN90 program which
reads a file of
points and computes the quality of dispersion.
Reference:

Peter Heelekalek,
On Correlation Analysis of Pseudorandom Numbers,
in Monte Carlo and QuasiMonte Carlo Methods 1996,
edited by Harald Niederreiter, Peter Hellekalek,
Gerhard Larcher, and Peter Zinterhof,
Volume 127 of Lecture Notes in Statistics,
Springer Verlag, 1997, pages 251265.

Peter Heelekalek, Harald Niederreiter,
The Weighted Spectral Test: Diaphony,
ACM Transactions on Modeling and Computer Simulation,
Volume 8, Number 1, January 1998, pages 4360.

Peter Heelekalek, Hannes Leeb,
Dyadic Diaphony,
Acta Arithmetica,
Volume 80, Number 2, 1997, pages 187196.
Source Code:
List of Routines:

MAIN is the main program for DIAPHONY.

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.

DIAPHONY evaluates the diaphony of a Ndimensional point set.

F evaluates the function used to calculate the diaphony.

FILE_COLUMN_COUNT counts the number of columns in the first line of a file.

FILE_ROW_COUNT counts the number of row records in a file.

GET_UNIT returns a free FORTRAN unit number.

R8_MODP returns the nonnegative remainder of real division.

R8MAT_DATA_READ reads data from an R8MAT file.

R8MAT_HEADER_READ reads the header from an R8MAT file.

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.
You can go up one level to
the FORTRAN90 source codes.
Last revised on 25 January 2012.