Skip to content

Latest commit

 

History

History
46 lines (29 loc) · 1.59 KB

Assorted.Utils.Collections.EnumerableExtensions.DamerauLevenshteinDistance.md

File metadata and controls

46 lines (29 loc) · 1.59 KB

EnumerableExtensions.DamerauLevenshteinDistance<TSource>(this IEnumerable<TSource>, IEnumerable<TSource>) Method

Namespace: Assorted.Utils.Collections
Assembly: Assorted.Utils (Assorted.Utils.dll) version 1.1.0.0

Returns the Damerau-Levenshtein distance of this sequence to a specified sequence.

Syntax

public static int DamerauLevenshteinDistance<TSource>(
    this IEnumerable<TSource> source, 
    IEnumerable<TSource> other
)

Type Parameters

TSource
The type of the elements in the sequences.

Parameters

source: IEnumerable<TSource>
A sequence of values.

other: IEnumerable<TSource>
The sequence to calculate the edit distance to.

Return Value

int
The distance as a non-negative integer where zero indicates that both sequences are equal.

Remarks

The Damerau-Levenshtein distance is defined as the minimum number of primitive edit operations needed to transform one sequence into the other and these operations are substitution, deletion, insertion and the transposition of two adjacent elements.

See Also


This document is generated by DG.