mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-09 05:38:39 +00:00
phpcs fixes
This commit is contained in:
parent
a714359ea9
commit
f6fb7f4747
|
|
@ -243,4 +243,4 @@ final class Kmeans
|
||||||
|
|
||||||
return $clusters;
|
return $clusters;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -117,4 +117,4 @@ class Point implements PointInterface
|
||||||
{
|
{
|
||||||
return $this->name;
|
return $this->name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -94,4 +94,4 @@ final class Bounded
|
||||||
|
|
||||||
return $backpack;
|
return $backpack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -68,4 +68,4 @@ final class Continuous
|
||||||
|
|
||||||
return $backpack;
|
return $backpack;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -144,11 +144,10 @@ class Path
|
||||||
$coord1 = $reverse[$i + 1];
|
$coord1 = $reverse[$i + 1];
|
||||||
|
|
||||||
$interpolated = $this->interpolate($coord0, $coord1);
|
$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;
|
$this->expandedNodes = $expanded;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -79,12 +79,11 @@ final class CubicSplineInterpolation implements InterpolationInterface
|
||||||
) {
|
) {
|
||||||
$this->points = $points;
|
$this->points = $points;
|
||||||
|
|
||||||
$n = \count($this->points);
|
$n = \count($this->points);
|
||||||
|
$b = [];
|
||||||
$b = [];
|
|
||||||
$matrix = new Matrix($n, $n);
|
$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 - 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, 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']));
|
$matrix->set($i, $i + 1, 1.0 / 3.0 * ($this->points[$i + 1]['x'] - $this->points[$i]['x']));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue
Block a user