Class Hamming<T>
Hamming distance.
Inheritance
System.Object
Hamming<T>
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: Mars.Numerics.Distances
Assembly: Mars.Numerics.dll
Syntax
[Serializable]
public class Hamming<T> : IMetric<T[]>, IDistance<T[]>, IDistance<T[], T[]>, ICloneable where T : IEquatable<T>
Type Parameters
Name | Description |
---|---|
T | The type of the elements to be compared. |
Methods
| Improve this Doc 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(T[], T[])
Computes the distance
d(x,y)
between points
x
and y
.
Declaration
public double Distance(T[] x, T[] y)
Parameters
Type | Name | Description |
---|---|---|
T[] | x | The first point x . |
T[] | 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
System.ICloneable