Commit 830ad222 authored by Mathieu Giraud's avatar Mathieu Giraud
Browse files

vidjil.cpp: similarity matrix, output only the exisiting clones rather the maximum number of clones

This is quadratic, both in time and in space in the .vidjil output.
parent e02fa391
...@@ -1460,10 +1460,10 @@ int main (int argc, char **argv) ...@@ -1460,10 +1460,10 @@ int main (int argc, char **argv)
representatives_labels); representatives_labels);
cout << RawOutputSimilarityMatrix(matrix, 90); cout << RawOutputSimilarityMatrix(matrix, 90);
if (max_clones > 0) { if (sort_clones.size() > 0 && max_clones > 0) {
//Compute all the edges //Compute all the edges
cout << "Compute distances" << endl ; cout << "Compute distances" << endl ;
SimilarityMatrix matrixLevenshtein = compare_windows(*windowsStorage, Levenshtein, max_clones); SimilarityMatrix matrixLevenshtein = compare_windows(*windowsStorage, Levenshtein, sort_clones.size());
//Added distances matrix in the JsonTab //Added distances matrix in the JsonTab
jsonLevenshtein << JsonOutputWindowsMatrix(matrixLevenshtein); jsonLevenshtein << JsonOutputWindowsMatrix(matrixLevenshtein);
} }
......
Markdown is supported
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