Struct Hamming
Hamming distance.
Implements
Namespace: ISynergy.Framework.Mathematics.Distances
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public struct Hamming : IMetric<byte[]>, IDistance<byte[]>, IDistance<byte[], byte[]>, IMetric<string>, IDistance<string>, IDistance<string, string>, IDistance<double[]>, IDistance<double[], double[]>, IMetric<BitArray>, IDistance<BitArray>, IDistance<BitArray, BitArray>
Methods
View SourceClone()
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. |
Distance(BitArray, BitArray)
Computes the distance d(x,y) between points
x and y.
Declaration
public double Distance(BitArray x, BitArray y)
Parameters
| Type | Name | Description |
|---|---|---|
| BitArray | x | The first point |
| BitArray | y | The second point |
Returns
| Type | Description |
|---|---|
| System.Double | A double-precision value representing the distance |
Distance(Byte[], Byte[])
Computes the distance d(x,y) between points
x and y.
Declaration
public double Distance(byte[] x, byte[] y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Byte[] | x | The first point |
| System.Byte[] | y | The second point |
Returns
| Type | Description |
|---|---|
| System.Double | A double-precision value representing the distance |
Distance(Double[], Double[])
Computes the distance d(x,y) between points
x and y.
Declaration
public double Distance(double[] x, double[] y)
Parameters
| Type | Name | Description |
|---|---|---|
| System.Double[] | x | The first point |
| System.Double[] | y | The second point |
Returns
| Type | Description |
|---|---|
| System.Double | A double-precision value representing the distance |
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 |
| System.String | y | The second point |
Returns
| Type | Description |
|---|---|
| System.Double | A double-precision value representing the distance |