ROSE  0.11.96.11
Namespaces | Classes | Functions | Variables
Rose::EditDistance Namespace Reference

Description

Edit distance algorithms and analyses.

Namespaces

 LinearEditDistance
 Edit distance for ASTs.
 
 TreeEditDistance
 Analysis to determine how to make one AST look like another.
 

Classes

struct  LevenshteinStack
 

Functions

template<typename T >
size_t damerauLevenshteinDistance (const std::vector< T > &src, const std::vector< T > &tgt)
 Damerau-Levenshtein edit distance. More...
 
void initDiagnostics ()
 Initialize diagnostics. More...
 
template<typename T >
size_t levenshteinDistance (const std::vector< T > &src, const std::vector< T > &tgt)
 Levenshtein edit distance. More...
 

Variables

Sawyer::Message::Facility mlog
 Diagnostic facility for edit distances.
 

Function Documentation

◆ damerauLevenshteinDistance()

template<typename T >
size_t Rose::EditDistance::damerauLevenshteinDistance ( const std::vector< T > &  src,
const std::vector< T > &  tgt 
)

Damerau-Levenshtein edit distance.

Returns the true Damerau-Levenshtein edit distance of vectors with adjacent transpositions. The arguments may be vectors of any type that defines an equality operation.

Definition at line 15 of file DamerauLevenshtein.h.

◆ initDiagnostics()

void Rose::EditDistance::initDiagnostics ( )

Initialize diagnostics.

Called from Rose::Diagnostics::initialize.

◆ levenshteinDistance()

template<typename T >
size_t Rose::EditDistance::levenshteinDistance ( const std::vector< T > &  src,
const std::vector< T > &  tgt 
)

Levenshtein edit distance.

Returns the Levenshtein edit distance of the specified vectors. The vectors may contain any type of element as long as they are both the same type and the element types define equality ("==" operator).

Definition at line 38 of file Levenshtein.h.

Referenced by Rose::EditDistance::LinearEditDistance::Analysis< NodeType >::compute().

Here is the caller graph for this function: