Class Manhattan
Inheritance
Implements
Inherited Members
Namespace: Mars.Numerics.Distances
Assembly: Mars.Numerics.dll
Syntax
[Serializable]
public class Manhattan : IMetric<double[]>, IDistance<double[]>, IDistance<double[], double[]>, IMetric<int[]>, IDistance<int[]>, IDistance<int[], int[]>, ICloneable
Remarks
Taxicab geometry, considered by Hermann Minkowski in 19th century Germany, is a form of geometry in which the usual distance function of metric or Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences of their Cartesian coordinates. The taxicab metric is also known as rectilinear distance, L1 distance or L1 norm (see Lp space), city block distance, Manhattan distance, or Manhattan length, with corresponding variations in the name of the geometry. The latter names allude to the grid layout of most streets on the island of Manhattan, which causes the shortest path a car could take between two intersections in the borough to have length equal to the intersections' distance in taxicab geometry.
References:
Methods
| Improve this Doc View SourceClone()
Declaration
public object Clone()
Returns
Type | Description |
---|---|
System.Object | A new object that is a copy of this instance. |
Remarks
Taxicab geometry, considered by Hermann Minkowski in 19th century Germany, is a form of geometry in which the usual distance function of metric or Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences of their Cartesian coordinates. The taxicab metric is also known as rectilinear distance, L1 distance or L1 norm (see Lp space), city block distance, Manhattan distance, or Manhattan length, with corresponding variations in the name of the geometry. The latter names allude to the grid layout of most streets on the island of Manhattan, which causes the shortest path a car could take between two intersections in the borough to have length equal to the intersections' distance in taxicab geometry.
References:
Distance(Double[], Double[])
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.
|
Remarks
Taxicab geometry, considered by Hermann Minkowski in 19th century Germany, is a form of geometry in which the usual distance function of metric or Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences of their Cartesian coordinates. The taxicab metric is also known as rectilinear distance, L1 distance or L1 norm (see Lp space), city block distance, Manhattan distance, or Manhattan length, with corresponding variations in the name of the geometry. The latter names allude to the grid layout of most streets on the island of Manhattan, which causes the shortest path a car could take between two intersections in the borough to have length equal to the intersections' distance in taxicab geometry.
References:
Distance(Int32[], Int32[])
d(x,y)
between points
x
and y
.
Declaration
public double Distance(int[] x, int[] y)
Parameters
Type | Name | Description |
---|---|---|
System.Int32[] | x | The first point x . |
System.Int32[] | 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.
|
Remarks
Taxicab geometry, considered by Hermann Minkowski in 19th century Germany, is a form of geometry in which the usual distance function of metric or Euclidean geometry is replaced by a new metric in which the distance between two points is the sum of the absolute differences of their Cartesian coordinates. The taxicab metric is also known as rectilinear distance, L1 distance or L1 norm (see Lp space), city block distance, Manhattan distance, or Manhattan length, with corresponding variations in the name of the geometry. The latter names allude to the grid layout of most streets on the island of Manhattan, which causes the shortest path a car could take between two intersections in the borough to have length equal to the intersections' distance in taxicab geometry.
References: