This program (version 2.4)
computes the averaged nearest neighbour distances for
different values of , and .
To randomly select reference points and neighbours, the first
step is to scramble the vector indices.
The last index is used for the reference point.
The distances are computed between the reference point and
other points where varies according to the specified
operation method (see section 3.3). Distances between points that are
close in time can be discarded (Theiler correction, see Chapter 6).
The distances are sorted according to their magnitude.
In fact sorting could be done at each time that a distance has been computed,
so that the neighbours up to the largest required one are sorted
while the rest remains unsorted. However, one call to a sort routine
[Singleton, 1969] for every reference point
turned out to be the most efficient.
The distances to the specified neighbours are stored and weighted with .
A next reference point is
obtained by swapping the current one with a new one and scramble
the remaining indices again.
The program has an option to choose reasonable values for and