pypdevsbbl.extra.spatial module¶
This file contains additional classes w.r.t. spatial properties.
Such properties include: - Coordinates - Distance computation - Multiple axes movement
-
class
pypdevsbbl.extra.spatial.Coordinate(x, y, z)[source]¶ Bases:
objectSimple 3-dimensional coordinate.
A coordinate in 3D will follow a cartesian coorinate system over 3 axes: x, y and z.
Parameters: - x (numeric) – The x-value of the coordinate.
- y (numeric) – The y-value of the coordinate.
- z (numeric) – The z-value of the coordinate.
-
class
pypdevsbbl.extra.spatial.distance[source]¶ Bases:
objectCompute the distance between two points.
-
static
euclidean(A, B)[source]¶ Computes the Euclidean distance between
AandB.Parameters: - A (Coordinate) – The first coordinate.
- B (Coordinate) – The second coordinate.
-
static
manhattan(A, B)[source]¶ Computes the Manhattan distance between
AandB.Parameters: - A (Coordinate) – The first coordinate.
- B (Coordinate) – The second coordinate.
-
static
chebyshev(A, B)[source]¶ Computes the Chebyshev distance between
AandB.Parameters: - A (Coordinate) – The first coordinate.
- B (Coordinate) – The second coordinate.
-
static
minkowski(A, B, p=2)[source]¶ Computes the Minkowski distance between
AandB.Parameters: - A (Coordinate) – The first coordinate.
- B (Coordinate) – The second coordinate.
- p (int) – The order of the distance. Must be greater than
or equal to 1. Defaults to 2 (=
euclidean()).
-
static