Description: Algorithm steps are as follows:
Step1. Type (2) is used to calculate the distance matrix D = (), including = dist [I, j] ()
Step2. Scan coordinate distance matrix D, looking for the maximum and the minimum distance, use type (3) calculate the limit
Step3. Scan coordinate distance matrix D, looking for matrix minimum distance of two data a, b, and the data to a, b to join the collection, = {a, b}, at the same time the data a, b is removed from the U, update the distance matrix D
Step4. Using (4) in the U find closest to the collection of data samples t, if less than the limit, then t join collection, at the same time t is removed from the set U, update the distance matrix D, repeat Step5, otherwise stop
Step5. If I < k, I = I+ 1, repeat steps Step3, Step4, until k collection is complete
Step6. Take the arithmetic mean of the collection of data for the data center, and to calculate the coordinates, to complete the selection of k data center.
The above steps distribution cu
To Search:
File list (Check if you may need any files):
kmeans1\9类配送结果.txt
.......\9类配送结果.txt.bak
.......\data2.txt
.......\Debug\kmeans.obj
.......\.....\kmeans1.exe
.......\.....\kmeans1.pdb
.......\.....\vc60.pdb
.......\kmeans.cpp
.......\kmeans1.dsp
.......\kmeans1.dsw
.......\kmeans1.ncb
.......\kmeans1.opt
.......\kmeans1.plg
.......\test.txt
.......\Debug
kmeans1