PAM, Partitioning Around Meoids, clustering algorithm is implemented and tested.