NAME
nst_lbg_step -- one iteration of LBG algorithm
PROTOTYPE
int nst_lbg_step( int iDim, int iCenters, float **ppfCenter, float **ppfRadii, int iNumData, float **ppfData, int *piCount, int *piBuf, float *pfMetric)
ARGUMENTS
- int iDim
- dimension of vectors to use
- int iCenters
- nr of center vectors
- float **ppfCenter
- iCenters pointers to these
- float **ppfRadii
- optional iCenters pointers to radii. If ppfRadii != NULL, it will be filled with the MSR radius of the set of data pnts in each voronoi cell.
- int iNumData
- nr of Data vectors
- float **ppfData
- iNumData pointers to these
- int *piCount
- nr of data pnts that fell into the voronoi cells (internally allocated, if NULL)
- int *piBuf
- workspace array of iNumData int's, internally allocated, if NULL. If piBuf is provided, k=piBuf[i] is taken to be the closest center to data point i before the present iteration. This information is used to speed up neighborhood computations and to calculate the nr of changes from the previous configuration. Previous values of piBuf[i] affect only this counting, not the resulting center vectors.
- float *pfMetric
- diagonal distance metric to use
RETURN VALUE:
The nr of neighborhood changes, if piBuf was specified.
Otherwise, the return value is always iNumData.
DESCRIPTION:
Uses the LBG algorithm to replace the iCenters center vectors
w[i], referenced by ppfCenter[0..iCenters-1] by new estimates.
Denoting by V[i] the index set of data vectors v[k] falling into
the Voronoi cell of center i, and by N[i] the number of these
vectors, the new positions are given by
w[i] = (1/N[i]) sum_k in V[i] v[k]
Centers i whose Voronoi cell contains no data points (N[i]=0)
remain unchanged.
FILE
/local/homes/rhaschke/nst7/man/../o.linx86//../nstsrc/nst_nr.c