Lines Matching refs:point
52 foreach ($this as $point) {
53 $points[] = $point->toArray();
70 $this->attach($point = $this->newPoint($coordinates), $data);
72 return $point;
75 public function attach($point, $data = null): void argument
77 if (!$point instanceof Point) {
81 parent::attach($point, $data);
98 foreach ($this as $point) {
100 if ($min[$n] === null || $min[$n] > $point[$n]) {
101 $min[$n] = $point[$n];
104 if ($max[$n] === null || $max[$n] < $point[$n]) {
105 $max[$n] = $point[$n];
115 $point = $this->newPoint(array_fill(0, $this->dimention, null));
119 $point[$n] = $rng($min[$n], $max[$n]);
122 return $point;
181 foreach ($this as $point) {
182 $distance = $point->getDistanceWith($point->getClosest($clusters), false);
239 foreach ($cluster as $point) {
241 $closest = $point->getClosest($clusters);
253 $attach[$closest]->attach($point);
254 $detach[$cluster]->attach($point);