phpOMS/Algorithm/Clustering/PointInterface.php
2022-11-09 22:55:39 +01:00

63 lines
1.2 KiB
PHP
Executable File

<?php
/**
* Karaka
*
* PHP Version 8.1
*
* @package phpOMS\Algorithm\Clustering
* @copyright Dennis Eichhorn
* @license OMS License 1.0
* @version 1.0.0
* @link https://karaka.app
*/
declare(strict_types=1);
namespace phpOMS\Algorithm\Clustering;
/**
* Point interface.
*
* @property int $group Group
* @property string $name Name
*
* @package phpOMS\Algorithm\Clustering;
* @license OMS License 1.0
* @link https://karaka.app
* @since 1.0.0
*/
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;
}