Closed cikaldev closed 3 years ago
Hi @cikaldev, sorry for the late response.
The cluster class is already 1. a point "array" (it's an IteratorAggregate containing the points) and 2. countable.
Hence to determine how many points are in a cluster just do:
echo count($cluster) . " points are in cluster";
The readme.md is not up to date... Sorry about that I'll make changes right now :+1:
Thanks for using my lib :v:
Environment
Problem
Fatal error: Uncaught Error: Call to undefined method KMeans\Cluster::getPoints()
Reconstructed
I just follow the code from Readme with a little change using 8 dimentions of array on
$points
variable, here is my codeThe problem gone if i remove
count($cluster->getPoints())
Regard's ian