clang 20.0.0git
Public Member Functions | List of all members
clang::diff::ZhangShashaMatcher Class Reference

Implementation of Zhang and Shasha's Algorithm for tree edit distance. More...

Public Member Functions

 ZhangShashaMatcher (const ASTDiff::Impl &DiffImpl, const SyntaxTree::Impl &T1, const SyntaxTree::Impl &T2, NodeId Id1, NodeId Id2)
 
std::vector< std::pair< NodeId, NodeId > > getMatchingNodes ()
 

Detailed Description

Implementation of Zhang and Shasha's Algorithm for tree edit distance.

Computes an optimal mapping between two trees using only insertion, deletion and update as edit actions (similar to the Levenshtein distance).

Definition at line 558 of file ASTDiff.cpp.

Constructor & Destructor Documentation

◆ ZhangShashaMatcher()

clang::diff::ZhangShashaMatcher::ZhangShashaMatcher ( const ASTDiff::Impl DiffImpl,
const SyntaxTree::Impl T1,
const SyntaxTree::Impl T2,
NodeId  Id1,
NodeId  Id2 
)
inline

Definition at line 565 of file ASTDiff.cpp.

References E, and clang::diff::Subtree::getSize().

Member Function Documentation

◆ getMatchingNodes()

std::vector< std::pair< NodeId, NodeId > > clang::diff::ZhangShashaMatcher::getMatchingNodes ( )
inline

The documentation for this class was generated from the following file: