|
119 | 119 |
|
120 | 120 |
|
121 | 121 | """ |
122 | | - chunk_initialize(alg::Hamerly, containers, centroids, design_matrix, r, idx) |
| 122 | + chunk_initialize(alg::Hamerly, containers, centroids, X, weights, metric, r, idx) |
123 | 123 |
|
124 | 124 | Initial calulation of all bounds and points labeling. |
125 | 125 | """ |
|
139 | 139 |
|
140 | 140 |
|
141 | 141 | """ |
142 | | - update_containers(::Hamerly, containers, centroids, n_threads) |
| 142 | + update_containers(::Hamerly, containers, centroids, n_threads, metric) |
143 | 143 |
|
144 | 144 | Calculates minimum distances from centers to each other. |
145 | 145 | """ |
|
159 | 159 |
|
160 | 160 |
|
161 | 161 | """ |
162 | | - chunk_update_centroids(::Hamerly, containers, centroids, X, r, idx) |
| 162 | + chunk_update_centroids(alg::Hamerly, containers, centroids, X, weights, metric, r, idx) |
163 | 163 |
|
164 | 164 | Detailed description of this function can be found in the original paper. It iterates through |
165 | 165 | all points and tries to skip some calculation using known upper and lower bounds of distances |
|
203 | 203 |
|
204 | 204 |
|
205 | 205 | """ |
206 | | - point_all_centers!(containers, centroids, X, i) |
| 206 | + point_all_centers!(containers, centroids, X, i, metric) |
207 | 207 |
|
208 | 208 | Calculates new labels and upper and lower bounds for all points. |
209 | 209 | """ |
|
236 | 236 |
|
237 | 237 |
|
238 | 238 | """ |
239 | | - move_centers(::Hamerly, containers, centroids) |
| 239 | + move_centers(::Hamerly, containers, centroids, metric) |
240 | 240 |
|
241 | 241 | Calculates new positions of centers and distance they have moved. Results are stored |
242 | 242 | in `centroids` and `p` respectively. |
|
0 commit comments