Skip to content

Commit

Permalink
Merge branch 'master' of github.com:MSeal/agglom_cluster
Browse files Browse the repository at this point in the history
  • Loading branch information
MSeal committed Jun 10, 2014
2 parents 263ddda + a216fe6 commit 1e83682
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions agglomcluster/agglomod.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,10 +148,8 @@ def run_greedy_clustering(self, quality, reheap_steps=500):

def add_pair_to_cost_heap(self, id1, id2):
qd = self.quality_difference(id1, id2)
if(id2 < id1):
temp = id1
id1 = id2
id2 = temp
if id2 < id1:
id1, id2 = id2, id1
# Negate quality difference (to maximize), AND id1 < id2
heapq.heappush(self.pair_cost_heap, (-qd, id1, id2))

Expand Down

0 comments on commit 1e83682

Please sign in to comment.