pub fn compute_element_similarity<'mem, 'facet>(
peek_a: Peek<'mem, 'facet>,
peek_b: Peek<'mem, 'facet>,
config: Option<&MatchingConfig>,
) -> SimilarityResult<'mem, 'facet>Expand description
Compute structural similarity between two Peek values using tree diff.
This uses the cinereus GumTree algorithm to:
- Build trees from both Peek values
- Compute a matching between nodes (hash-based + Dice coefficient)
- Return a similarity score based on how many nodes matched
The similarity score is: matched_nodes / max(nodes_a, nodes_b)
§Arguments
peek_a- First value to comparepeek_b- Second value to compareconfig- Optional matching configuration (uses defaults if None)
§Returns
A SimilarityResult containing the score and edit operations