/// <summary> /// Handles the ClusteringFinished event /// </summary> /// <param name="sender">The object that fired the event</param> /// <param name="e">The arguments for the event</param> private void ClusteringFinishedHandler(object sender, ClusteringEventArgs e) { if (IsActive && IsValid) { IsPartOfActiveClustering = true; previousDescriptor = GetSimilarityDescriptor(); } }
/// <summary> /// Executes the clustering operation using the /// propvided threshold value /// </summary> private void RunClustering(double threshold) { List <AttributeSimilarityDescriptor> descriptors = new List <AttributeSimilarityDescriptor>(); // Get all similarity descriptors foreach (AttributeSimilarityCriterionViewModel criterionVM in SimilarityCriteria) { AttributeSimilarityDescriptor newDescriptor = criterionVM.GetSimilarityDescriptor(); // Ensure that a new descriptor was returned if (newDescriptor != null) { descriptors.Add(newDescriptor); } } // Ensure that we have some descriptors if (descriptors.Count > 0) { OnClusteringStarted(EventArgs.Empty); similarityClustering.PerformClustering(threshold, descriptors); } }