Class BaseMahalanobis
Base Mahalanobis class.
Namespace: ISynergy.Framework.Mathematics.Distances.Base
Assembly: ISynergy.Framework.Mathematics.dll
Syntax
public abstract class BaseMahalanobis : object, IMetric<double[]>, IDistance<double[]>, IDistance<double[], double[]>
Constructors
View SourceBaseMahalanobis()
Empty constructor.
Declaration
protected BaseMahalanobis()
BaseMahalanobis(CholeskyDecomposition)
Initializes a new instance of the Mahalanobis class.
Declaration
protected BaseMahalanobis(CholeskyDecomposition chol)
Parameters
Type | Name | Description |
---|---|---|
CholeskyDecomposition | chol | A Cholesky decomposition of the covariance matrix. |
BaseMahalanobis(SingularValueDecomposition)
Initializes a new instance of the Mahalanobis class.
Declaration
protected BaseMahalanobis(SingularValueDecomposition svd)
Parameters
Type | Name | Description |
---|---|---|
SingularValueDecomposition | svd | A Singular Value decomposition of the covariance matrix. |
BaseMahalanobis(Double[,])
Initializes a new instance of the Mahalanobis class.
Declaration
protected BaseMahalanobis(double[, ] precision)
Parameters
Type | Name | Description |
---|---|---|
System.Double[,] | precision | The precision matrix (the inverse of the covariance matrix). |
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(Double[], Double[])
Computes the distance d(x,y)
between points
x
and y
.
Declaration
public virtual 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 |
Implements
ICloneable