mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-11 09:48:40 +00:00
fix type hint
This commit is contained in:
parent
a75025c1a0
commit
d8bf78c7b4
|
|
@ -136,6 +136,7 @@ final class Kmeans
|
|||
foreach ($points as $point) {
|
||||
$clusterPoint = $clusterCenters[$point->getGroup()];
|
||||
|
||||
// this should ensure that clusterPoint and therfore the center group is never 0. But this is not true.
|
||||
$clusterPoint->setGroup(
|
||||
$clusterPoint->getGroup() + 1
|
||||
);
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ class Point implements PointInterface
|
|||
/**
|
||||
* Coordinates of the point
|
||||
*
|
||||
* @var array
|
||||
* @var array<int, int|float>
|
||||
* @sicne 1.0.0
|
||||
*/
|
||||
private array $coordinates = [];
|
||||
|
|
@ -81,7 +81,7 @@ class Point implements PointInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function setCoordinate($index, $value)
|
||||
public function setCoordinate($index, $value) : void
|
||||
{
|
||||
$this->coordinates[$index] = $value;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ interface PointInterface
|
|||
*
|
||||
* @param mixed $index Index of the coordinate (e.g. 0 = x);
|
||||
*
|
||||
* @return array
|
||||
* @return int|float
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
|
|
@ -51,11 +51,11 @@ interface PointInterface
|
|||
* @param mixed $index Index of the coordinate (e.g. 0 = x);
|
||||
* @param mixed $value Value of the coordinate
|
||||
*
|
||||
* @return array
|
||||
* @return void
|
||||
*
|
||||
* @since 1.0.0
|
||||
*/
|
||||
public function setCoordinate($index, $value);
|
||||
public function setCoordinate($index, $value) : void;
|
||||
|
||||
/**
|
||||
* Get group this point belongs to
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user