Lines Matching refs:space
25 // prepare 50 points of 2D space to be clustered
39 // create a 2-dimentions space
40 $space = new KMeans\Space(2);
42 // add points to space
44 $space->addPoint($coordinates);
48 $clusters = $space->solve(3);
63 **Note:** the example is given with points of a 2D space but it will work with any dimention >1.
105 ### List all points of a space/cluster:
116 $point = $space->addPoint([$x, $y, $z], "user #123");
122 $data = $space[$point]; // e.g. "user #123"
130 $clusters = $space->solve(3, function($space, $clusters) {