phpcs fixes

This commit is contained in:
Dennis Eichhorn 2019-10-19 18:50:53 +02:00
parent a714359ea9
commit f6fb7f4747
6 changed files with 9 additions and 11 deletions

View File

@ -243,4 +243,4 @@ final class Kmeans
return $clusters;
}
}
}

View File

@ -117,4 +117,4 @@ class Point implements PointInterface
{
return $this->name;
}
}
}

View File

@ -94,4 +94,4 @@ final class Bounded
return $backpack;
}
}
}

View File

@ -68,4 +68,4 @@ final class Continuous
return $backpack;
}
}
}

View File

@ -144,11 +144,10 @@ class Path
$coord1 = $reverse[$i + 1];
$interpolated = $this->interpolate($coord0, $coord1);
$expanded = \array_merge($expanded, $interpolated);
$expanded = \array_merge($expanded, $interpolated);
}
$expanded[] = $reverse[$length - 1];
$expanded[] = $reverse[$length - 1];
$this->expandedNodes = $expanded;
}

View File

@ -79,12 +79,11 @@ final class CubicSplineInterpolation implements InterpolationInterface
) {
$this->points = $points;
$n = \count($this->points);
$b = [];
$n = \count($this->points);
$b = [];
$matrix = new Matrix($n, $n);
for($i = 1; $i < $n - 1; ++$i) {
for ($i = 1; $i < $n - 1; ++$i) {
$matrix->set($i, $i - 1, 1.0 / 3.0 * ($this->points[$i]['x'] - $this->points[$i - 1]['x']));
$matrix->set($i, $i, 2.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i - 1]['x']));
$matrix->set($i, $i + 1, 1.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i]['x']));