Arkanjo 0.1
A tool for find code duplicated functions in codebases
|
Manages and analyzes function similarity relationships. More...
#include <similarity_table.hpp>
Public Member Functions | |
Similarity_Table (double _similarity_threshold) | |
Constructs with custom similarity threshold. | |
Similarity_Table () | |
Constructs with default similarity threshold. | |
void | update_similarity (double new_similarity_threshold) |
Updates similarity threshold. | |
double | get_similarity (Path path1, Path path2) |
Gets similarity between two paths. | |
double | is_similar (Path path1, Path path2) |
Checks if two paths are similar. | |
vector< Path > | get_path_list () |
Gets list of all known paths. | |
vector< Path > | get_similar_path_to_the_reference (Path reference) |
Gets paths similar to reference path. | |
vector< tuple< double, Path, Path > > | get_all_path_pairs_and_similarity_sorted_by_similarity () |
Gets all similar path pairs with scores, sorted. | |
vector< pair< Path, Path > > | get_all_similar_path_pairs_sorted_by_similarity () |
Gets all similar path pairs, sorted by similarity. | |
vector< pair< Path, Path > > | get_all_similar_path_pairs_sorted_by_line_number () |
Gets all similar path pairs, sorted by line count. | |
Manages and analyzes function similarity relationships.
Stores pairs of similar functions with their similarity scores, providing various query and analysis capabilities.
Definition at line 34 of file similarity_table.hpp.
Similarity_Table::Similarity_Table | ( | double | _similarity_threshold | ) |
Constructs with custom similarity threshold.
_similarity_threshold | Initial threshold value |
Definition at line 48 of file similarity_table.cpp.
Similarity_Table::Similarity_Table | ( | ) |
Constructs with default similarity threshold.
Definition at line 53 of file similarity_table.cpp.
vector< tuple< double, Path, Path > > Similarity_Table::get_all_path_pairs_and_similarity_sorted_by_similarity | ( | ) |
Gets all similar path pairs with scores, sorted.
Definition at line 103 of file similarity_table.cpp.
Gets all similar path pairs, sorted by line count.
Definition at line 144 of file similarity_table.cpp.
Gets all similar path pairs, sorted by similarity.
Definition at line 116 of file similarity_table.cpp.
vector< Path > Similarity_Table::get_path_list | ( | ) |
Gets list of all known paths.
Definition at line 88 of file similarity_table.cpp.
Gets paths similar to reference path.
reference | Path to compare against |
Definition at line 92 of file similarity_table.cpp.
Gets similarity between two paths.
path1 | First path to compare |
path2 | Second path to compare |
Definition at line 62 of file similarity_table.cpp.
Checks if two paths are similar.
path1 | First path to compare |
path2 | Second path to compare |
Definition at line 83 of file similarity_table.cpp.
void Similarity_Table::update_similarity | ( | double | new_similarity_threshold | ) |
Updates similarity threshold.
new_similarity_threshold | New threshold value |
Definition at line 58 of file similarity_table.cpp.