Method VectorDistance
VectorDistance(Double[], Double[], Double)
Calculate the p-norm (i.e. length) between two vectors
Declaration
[Obsolete]
public static double VectorDistance(double[] vec1, double[] vec2, double power)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | vec1 | The first vector |
System.Double[] | vec2 | The second vector |
System.Double | power | The power (2 for cartesian distance, 1 for manhattan, etc.) |
Returns
Type | Description |
---|---|
System.Double | The length. See http://en.wikipedia.org/wiki/Lp_space |
See Also
VectorDistance(Double[], Double[], Double, Double)
Calculate the p-norm (i.e. length) between two vectors
Declaration
[Obsolete]
public static double VectorDistance(double[] vec1, double[] vec2, double power, double oneOverPower)
Parameters
Type | Name | Description |
---|---|---|
System.Double[] | vec1 | The first vector |
System.Double[] | vec2 | The second vector |
System.Double | power | The power (2 for cartesian distance, 1 for manhattan, etc.) |
System.Double | oneOverPower | If you've precalculated |
Returns
Type | Description |
---|---|
System.Double | The length. |