Skip to content

Commit

Permalink
nvm, hard cap dist at 1 instead
Browse files Browse the repository at this point in the history
  • Loading branch information
Brian Ondov committed Jul 30, 2018
1 parent aa809ba commit 512bbbe
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/mash/CommandDistance.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -383,9 +383,14 @@ void compareSketches(CommandDistance::CompareOutput::PairOutput * output, const
{
//distance = log(double(common + 1) / (denom + 1)) / log(1. / (denom + 1));
distance = -log(2 * jaccard / (1. + jaccard)) / kmerSize;

if ( distance > 1 )
{
distance = 1;
}
}

if ( distance > maxDistance && maxDistance < 1. )
if ( distance > maxDistance )
{
return;
}
Expand Down

0 comments on commit 512bbbe

Please sign in to comment.