Commit 64d34d02 authored by jkvis's avatar jkvis
Browse files

Added separator weights in transpositions

parent 83540ba4
......@@ -445,7 +445,7 @@ size_t extractor_transposition(std::vector<Variant> &variant,
// Recursively apply this function to the prefixes of the strings
std::vector<Variant> prefix;
weight += extractor_transposition(prefix, reference, complement, reference_start, reference_end, sample, sample_start, lcs->sample_index, lcs->sample_index - sample_start);
weight += extractor_transposition(prefix, reference, complement, reference_start, reference_end, sample, sample_start, lcs->sample_index, lcs->sample_index - sample_start) + WEIGHT_SEPARATOR;
// Stop if the weight of the variant exeeds the trivial weight.
if (weight > weight_trivial)
......@@ -457,7 +457,7 @@ size_t extractor_transposition(std::vector<Variant> &variant,
// Recursively apply this function to the suffixes of the strings.
std::vector<Variant> suffix;
weight += extractor_transposition(suffix, reference, complement, reference_start, reference_end, sample, lcs->sample_index + length, sample_end, sample_end - (lcs->sample_index + length));
weight += extractor_transposition(suffix, reference, complement, reference_start, reference_end, sample, lcs->sample_index + length, sample_end, sample_end - (lcs->sample_index + length)) + WEIGHT_SEPARATOR;
// Stop if the weight of the variant exeeds the trivial weight.
if (weight > weight_trivial)
......@@ -482,9 +482,7 @@ size_t extractor_transposition(std::vector<Variant> &variant,
variant.insert(variant.end(), suffix.begin(), suffix.end());
// Separators within transpositions are counted.
return weight + variant.size() - 1;
return weight;
} // extractor_transposition
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment