Soenneker.Utils.Strings.HammingDistance 3.0.39

Prefix Reserved
There is a newer version of this package available.
See the version list below for details.
dotnet add package Soenneker.Utils.Strings.HammingDistance --version 3.0.39                
NuGet\Install-Package Soenneker.Utils.Strings.HammingDistance -Version 3.0.39                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Soenneker.Utils.Strings.HammingDistance" Version="3.0.39" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Soenneker.Utils.Strings.HammingDistance --version 3.0.39                
#r "nuget: Soenneker.Utils.Strings.HammingDistance, 3.0.39"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Soenneker.Utils.Strings.HammingDistance as a Cake Addin
#addin nuget:?package=Soenneker.Utils.Strings.HammingDistance&version=3.0.39

// Install Soenneker.Utils.Strings.HammingDistance as a Cake Tool
#tool nuget:?package=Soenneker.Utils.Strings.HammingDistance&version=3.0.39                

alternate text is missing from this package README image alternate text is missing from this package README image alternate text is missing from this package README image

alternate text is missing from this package README image Soenneker.Utils.Strings.HammingDistance

A utility library for comparing strings via the Hamming Distance algorithm

Installation

dotnet add package Soenneker.Utils.Strings.HammingDistance

Why Hamming Distance?

Hamming Distance is a simple yet powerful metric for comparing strings or sequences of equal length. It is especially useful in scenarios where exact alignment and positional differences matter, such as:

Positional Accuracy:

Hamming Distance identifies and quantifies differences at each specific position in two sequences.

Binary or Fixed-Length Data:

It is ideal for comparing fixed-length strings, binary data, or encoded sequences.

Lightweight and Efficient:

Hamming Distance has low computational overhead, making it well-suited for performance-critical applications.

Ideal for Error Detection:

It is commonly used in error detection and correction algorithms, like detecting bit-flip errors in transmitted data.


Usage

var text1 = "kitten";
var text2 = "sitten";

double similarityPercentage = HammingDistanceStringUtil.CalculatePercentage(text1, text2); // ~83.33

Note:

Hamming Distance requires strings of equal length. If the strings differ in length, an exception will be thrown to ensure valid comparisons.

Product Compatible and additional computed target framework versions.
.NET net9.0 is compatible. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
  • net9.0

    • No dependencies.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
3.0.61 66 12/24/2024
3.0.60 70 12/24/2024
3.0.59 58 12/24/2024
3.0.58 68 12/24/2024
3.0.57 59 12/24/2024
3.0.56 72 12/24/2024
3.0.55 62 12/24/2024
3.0.54 70 12/24/2024
3.0.53 63 12/24/2024
3.0.52 69 12/23/2024
3.0.51 68 12/23/2024
3.0.50 73 12/23/2024
3.0.49 69 12/23/2024
3.0.48 69 12/23/2024
3.0.47 70 12/22/2024
3.0.46 70 12/22/2024
3.0.45 67 12/22/2024
3.0.44 67 12/22/2024
3.0.43 70 12/22/2024
3.0.42 72 12/21/2024
3.0.41 70 12/21/2024
3.0.40 66 12/21/2024
3.0.39 66 12/21/2024
3.0.38 64 12/21/2024
3.0.37 72 12/21/2024
3.0.36 67 12/21/2024
3.0.35 67 12/20/2024
3.0.34 70 12/20/2024
3.0.33 81 12/20/2024
3.0.32 65 12/20/2024
3.0.31 69 12/20/2024
3.0.30 73 12/19/2024
3.0.29 71 12/19/2024
3.0.28 65 12/19/2024
3.0.27 64 12/19/2024
3.0.26 75 12/18/2024
3.0.25 66 12/18/2024
3.0.24 65 12/16/2024
3.0.23 59 12/16/2024
3.0.22 68 12/10/2024
3.0.21 71 12/10/2024
3.0.20 69 12/9/2024
3.0.19 72 12/9/2024
3.0.18 74 12/9/2024
3.0.17 69 12/9/2024
3.0.16 72 12/9/2024
3.0.15 73 12/7/2024
3.0.14 76 12/6/2024
3.0.13 71 12/6/2024
3.0.12 69 12/6/2024
3.0.11 68 12/6/2024
3.0.10 76 12/6/2024
3.0.9 70 12/6/2024
3.0.8 73 12/6/2024
3.0.7 72 12/6/2024
3.0.6 75 12/6/2024
3.0.5 77 12/6/2024
3.0.4 78 12/5/2024
3.0.3 72 12/5/2024
3.0.2 73 12/4/2024
3.0.1 79 12/4/2024