Class Angular
Angular distance, or the proper distance metric version of Cosine distance.
Inheritance
System.Object
Angular
Implements
IMetric<System.Double[]>
IDistance<System.Double[]>
ISimilarity<System.Double[]>
ICloneable
Namespace: Mars.Numerics.Distances
Assembly: Mars.Numerics.dll
Syntax
public class Angular : object, IMetric<double[]>, IDistance<double[]>, IDistance<double[], double[]>, ISimilarity<double[]>, ISimilarity<double[], double[]>, ICloneable
Methods
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. |
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 x . |
System.Double[] | 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.
|
Similarity(Double[], Double[])
Gets a similarity measure between two points.
Declaration
public double Similarity(double[] x, double[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | x | The first point to be compared. |
System.Double[] | y | The second point to be compared. |
Returns
Type | Description |
---|---|
System.Double | A similarity measure between x and y. |
Implements
ICloneable