X-Git-Url: https://git.donarmstrong.com/?p=mothur.git;a=blobdiff_plain;f=ignoregaps.h;h=894f92d9644182ece0a7d18e491384d2058f2d54;hp=8127b6205e42d18516561565e8a4eb29ccd56ab6;hb=050a3ff02473a3d4c0980964e1a9ebe52e55d6b8;hpb=b01e4c8527e66f227eff16cf296eeadf060306b6 diff --git a/ignoregaps.h b/ignoregaps.h index 8127b62..894f92d 100644 --- a/ignoregaps.h +++ b/ignoregaps.h @@ -20,41 +20,41 @@ class ignoreGaps : public Dist { public: + ignoreGaps() {} + void calcDist(Sequence A, Sequence B){ int diff = 0; int length = 0; int start = 0; - int end = 0; + bool overlap = false; - for(int i=0;i=0;i--){ - if(A.getAligned()[i] == '.' || B.getAligned()[i] == '.' || A.getAligned()[i] == '-' || B.getAligned()[i] == '-'){ - } - else{ - end = i; + overlap = true; break; } } - for(int i=start; i<=end; i++){ - if(A.getAligned()[i] == '.' || B.getAligned()[i] == '.'){ + for(int i=start; i