From 00299aeb9ea8dd51242f2c5327e6816ef92328c8 Mon Sep 17 00:00:00 2001 From: Laurent Monin Date: Fri, 1 Mar 2019 11:56:51 +0100 Subject: [PATCH] clusterCount -> cluster_count --- picard/cluster.py | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/picard/cluster.py b/picard/cluster.py index 08dccbc5a..f98b02ad1 100644 --- a/picard/cluster.py +++ b/picard/cluster.py @@ -454,7 +454,7 @@ class ClusterEngine(object): # the cluster dictionary we're using self.cluster_dict = cluster_dict # keeps track of unique cluster index - self.clusterCount = 0 + self.cluster_count = 0 # Keeps track of the clusters we've created self.clusterBins = {} # Index the word ids -> clusters @@ -503,9 +503,9 @@ class ClusterEngine(object): for i in range(self.cluster_dict.getSize()): word, count = self.cluster_dict.getWordAndCount(i) if word and count > 1: - self.clusterBins[self.clusterCount] = [i] - self.idClusterIndex[i] = self.clusterCount - self.clusterCount = self.clusterCount + 1 + self.clusterBins[self.cluster_count] = [i] + self.idClusterIndex[i] = self.cluster_count + self.cluster_count = self.cluster_count + 1 for i in range(len(heap)): c, pair = heappop(heap) @@ -523,10 +523,10 @@ class ClusterEngine(object): # if neither item is in a cluster, make a new cluster if match0 == -1 and match1 == -1: - self.clusterBins[self.clusterCount] = [pair[0], pair[1]] - self.idClusterIndex[pair[0]] = self.clusterCount - self.idClusterIndex[pair[1]] = self.clusterCount - self.clusterCount = self.clusterCount + 1 + self.clusterBins[self.cluster_count] = [pair[0], pair[1]] + self.idClusterIndex[pair[0]] = self.cluster_count + self.idClusterIndex[pair[1]] = self.cluster_count + self.cluster_count = self.cluster_count + 1 continue # If cluster0 is in a bin, stick the other match into that bin