private Cluster getNearestCluster(User user) { if (Clusters == null) { return(null); } return(Clusters.OrderByDescending(y => user.Distance(y.Center)).First()); }
public Cluster GetBestCluster() { if (!IsValid()) { throw new Exception("Clusters is not available"); } return(Clusters.OrderByDescending(p => p.Points.Count).First()); }