Elkan algorithm implementation with necessary testing.
Refactoring of the previous code. Unfortunately, I wasn't able yet to generalize all of the approaches to a single framework, so there is still a lot of work to do, but here some conventions that were used in this refactoring:
2.1. Since all of the functions are mutating usage of ! is excessive, so it was removed altogether.
2.2. Since all functions dispatches on corresponding type, single order is used throughout all functions: alg, containers, centroids. Maybe in the future containers can become part of the corresponding alg structure, so this order become even more obvious.
Few things here.
Elkan
algorithm implementation with necessary testing.!
is excessive, so it was removed altogether. 2.2. Since all functions dispatches on corresponding type, single order is used throughout all functions:alg
,containers
,centroids
. Maybe in the future containers can become part of the correspondingalg
structure, so this order become even more obvious.