phpOMS/Algorithm/Clustering/PointInterface.php
Dennis Eichhorn 0a8a5c63c5
Some checks failed
Compress images / calibreapp/image-actions (push) Has been cancelled
CI / general_module_workflow_php (push) Has been cancelled
fix permissions
2025-04-02 14:15:07 +00:00

78 lines
1.6 KiB
PHP

<?php
/**
* Jingga
*
* PHP Version 8.2
*
* @package phpOMS\Algorithm\Clustering
* @copyright Dennis Eichhorn
* @license OMS License 2.2
* @version 1.0.0
* @link https://jingga.app
*/
declare(strict_types=1);
namespace phpOMS\Algorithm\Clustering;
/**
* Point interface.
*
* @property int $group Group
* @property string $name Name
* @property array $coordinates Coordinates
*
* @package phpOMS\Algorithm\Clustering;
* @license OMS License 2.2
* @link https://jingga.app
* @since 1.0.0
*
* @property array<int, int|float> $coordinates
* @property string $name
* @property int $group
*/
interface PointInterface
{
/**
* Get the point coordinates
*
* @return array<int, int|float>
*
* @since 1.0.0
*/
public function getCoordinates() : array;
/**
* Get the coordinate of the point
*
* @param int $index Index of the coordinate (e.g. 0 = x);
*
* @return int|float
*
* @since 1.0.0
*/
public function getCoordinate(int $index) : int | float;
/**
* Set the coordinate of the point
*
* @param int $index Index of the coordinate (e.g. 0 = x);
* @param int|float $value Value of the coordinate
*
* @return void
*
* @since 1.0.0
*/
public function setCoordinate(int $index, int | float $value) : void;
/**
* Check if two points are equal
*
* @param Point $point Point to compare with
*
* @return bool
*
* @since 1.0.0
*/
public function isEquals(Point $point) : bool;
}