From 512bbbe28fce6f3ce961545f999f0e8b914a822a Mon Sep 17 00:00:00 2001 From: Brian Ondov Date: Mon, 30 Jul 2018 10:23:04 -0400 Subject: [PATCH] nvm, hard cap dist at 1 instead --- src/mash/CommandDistance.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/mash/CommandDistance.cpp b/src/mash/CommandDistance.cpp index 443cec1..5e17947 100644 --- a/src/mash/CommandDistance.cpp +++ b/src/mash/CommandDistance.cpp @@ -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; }