Algorithm 1. Unsupervised Learning Functional Data Clustering Based on Adaptive Weights