Generated by DocFX

Struct Levenshtein

Levenshtein distance.

Implements
IMetric<System.String>
IDistance<System.String>
IDistance<System.String, System.String>
ICloneable
Namespace: ISynergy.Framework.Mathematics.Distances
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public struct Levenshtein : IMetric<string>, IDistance<string>, IDistance<string, string>
Remarks

In information theory and computer science, the Levenshtein distance is a string metric for measuring the difference between two sequences. Informally, the Levenshtein distance between two words is the minimum number of single-character edits (i.e. insertions, deletions or substitutions) required to change one word into the other. It is named after Vladimir Levenshtein, who considered this distance in 1965.

Levenshtein distance may also be referred to as edit distance, although that may also denote a larger family of distance metrics. It is closely related to pairwise string alignments.

References:

  • https://en.wikipedia.org/wiki/Levenshtein_distance

Methods

View Source

Clone()

Creates a new object that is a copy of the current instance.

Declaration
public object Clone()
Returns
Type Description
System.Object

A new object that is a copy of this instance.

View Source

Distance(String, String)

Computes the distance d(x,y) between points x and y.

Declaration
public double Distance(string x, string y)
Parameters
Type Name Description
System.String x

The first point x.

System.String y

The second point y.

Returns
Type Description
System.Double

A double-precision value representing the distance d(x,y) between x and y according to the distance function implemented by this class.

Implements

IMetric<T>
IDistance<T>
IDistance<T, U>
ICloneable

Extension Methods

EnumExtensions.GetSymbol<T>(T)
ArrayExtensions.Concatenate<T>(T, T[])
CollectionExtensions.FromHierarchy<TSource>(TSource, Func<TSource, TSource>, Func<TSource, Boolean>)
ObjectExtensions.Clone<T>(T)
ObjectExtensions.AddressOf<T>(T)
ObjectExtensions.ToByteArray<T>(T)
ReflectionExtensions.GetPropertyInfo<T, TValue>(T, Expression<Func<T, TValue>>)

See Also

Levenshtein<T>