Code Coverage |
||||||||||
Lines |
Functions and Methods |
Classes and Traits |
||||||||
Total | n/a |
0 / 0 |
n/a |
0 / 0 |
CRAP | n/a |
0 / 0 |
1 | <?php |
2 | /** |
3 | * Jingga |
4 | * |
5 | * PHP Version 8.1 |
6 | * |
7 | * @package phpOMS\Algorithm\Clustering |
8 | * @copyright Dennis Eichhorn |
9 | * @license OMS License 2.0 |
10 | * @version 1.0.0 |
11 | * @link https://jingga.app |
12 | */ |
13 | declare(strict_types=1); |
14 | |
15 | namespace phpOMS\Algorithm\Clustering; |
16 | |
17 | /** |
18 | * Point interface. |
19 | * |
20 | * @property int $group Group |
21 | * @property string $name Name |
22 | * @property array $coordinates Coordinates |
23 | * |
24 | * @package phpOMS\Algorithm\Clustering; |
25 | * @license OMS License 2.0 |
26 | * @link https://jingga.app |
27 | * @since 1.0.0 |
28 | */ |
29 | interface PointInterface |
30 | { |
31 | /** |
32 | * Get the point coordinates |
33 | * |
34 | * @return array<int, int|float> |
35 | * |
36 | * @since 1.0.0 |
37 | */ |
38 | public function getCoordinates() : array; |
39 | |
40 | /** |
41 | * Get the coordinate of the point |
42 | * |
43 | * @param int $index Index of the coordinate (e.g. 0 = x); |
44 | * |
45 | * @return int|float |
46 | * |
47 | * @since 1.0.0 |
48 | */ |
49 | public function getCoordinate(int $index) : int | float; |
50 | |
51 | /** |
52 | * Set the coordinate of the point |
53 | * |
54 | * @param int $index Index of the coordinate (e.g. 0 = x); |
55 | * @param int|float $value Value of the coordinate |
56 | * |
57 | * @return void |
58 | * |
59 | * @since 1.0.0 |
60 | */ |
61 | public function setCoordinate(int $index, int | float $value) : void; |
62 | |
63 | /** |
64 | * Check if two points are equal |
65 | * |
66 | * @param self $point Point to compare with |
67 | * |
68 | * @return bool |
69 | * |
70 | * @since 1.0.0 |
71 | */ |
72 | public function isEquals(self $point) : bool; |
73 | } |