import pyLHD
sample = pyLHD.GoodLatticePoint(size = (5,3),seed =1)
l1 = pyLHD.LqDistance(sample,q=1)
l1.pairwise()array([4., 5., 7., 7., 5., 5., 9., 4., 6., 8.])
criteria.LqDistance(self, arr, q=1)
| Name | Description |
|---|---|
| design | Calculate the minimum Lq distance among all pairwise distances in the array |
| index | Calculate the Lq norm (distance) between two points (rows or columns) in an array. |
| pairwise | Calculate the Lq distance among all pairwise distances in the array |
criteria.LqDistance.design()
Calculate the minimum Lq distance among all pairwise distances in the array
| Type | Description |
|---|---|
| float | The minimum Lq distance among all pairs of points in the array |
Example:
criteria.LqDistance.index(i, j, axis=0)
Calculate the Lq norm (distance) between two points (rows or columns) in an array. The points can be either two rows or two columns in the array, depending on the axis parameter
| Name | Type | Description | Default |
|---|---|---|---|
i |
int | The index of the first point (row or column based on axis) | required |
j |
int | The index of the second point (row or column based on axis) | required |
axis |
int | The axis along which to compute the distance axis = 0 for distances between rows, axis = 1 for distances between columns. Defaults to 0 | 0 |
| Type | Description |
|---|---|
| ValueError | If the axis is not 0 (for rows) or 1 (for columns) |
| Type | Description |
|---|---|
| float | The Lq distance between the two specified points |
Example:
criteria.LqDistance.pairwise()
Calculate the Lq distance among all pairwise distances in the array
| Type | Description |
|---|---|
| numpy.numpy.ndarray | The Lq distance among all pairs of points in the array |
Example: