From: martinahansen Date: Mon, 25 Jun 2012 11:36:40 +0000 (+0000) Subject: fixed bug in findsim.rb X-Git-Url: https://git.donarmstrong.com/?a=commitdiff_plain;h=5043d2911f06f732a30e790cbe360577054fecda;p=biopieces.git fixed bug in findsim.rb git-svn-id: http://biopieces.googlecode.com/svn/trunk@1847 74ccb610-7750-0410-82ae-013aeee3265d --- diff --git a/code_ruby/lib/maasha/findsim.rb b/code_ruby/lib/maasha/findsim.rb index d33229d..7e5d100 100644 --- a/code_ruby/lib/maasha/findsim.rb +++ b/code_ruby/lib/maasha/findsim.rb @@ -160,6 +160,8 @@ class FindSim score = new_score if new_score > score end + best_score = 0 + if @opt_hash[:max_diversity] best_score = score if i == 0 break if best_score - score > @opt_hash[:max_diversity]