mirror of
https://github.com/furyfire/trueskill.git
synced 2025-04-16 11:04:27 +00:00
PSR1, PSR2 and PSR12 code standards
This commit is contained in:
@ -74,16 +74,8 @@ class Matrix
|
||||
$transposeMatrix = [];
|
||||
|
||||
$rowMatrixData = $this->matrixRowData;
|
||||
for (
|
||||
$currentRowTransposeMatrix = 0;
|
||||
$currentRowTransposeMatrix < $this->columnCount;
|
||||
$currentRowTransposeMatrix++
|
||||
) {
|
||||
for (
|
||||
$currentColumnTransposeMatrix = 0;
|
||||
$currentColumnTransposeMatrix < $this->rowCount;
|
||||
$currentColumnTransposeMatrix++
|
||||
) {
|
||||
for ($currentRowTransposeMatrix = 0; $currentRowTransposeMatrix < $this->columnCount; $currentRowTransposeMatrix++) {
|
||||
for ($currentColumnTransposeMatrix = 0; $currentColumnTransposeMatrix < $this->rowCount; $currentColumnTransposeMatrix++) {
|
||||
$transposeMatrix[$currentRowTransposeMatrix][$currentColumnTransposeMatrix] =
|
||||
$rowMatrixData[$currentColumnTransposeMatrix][$currentRowTransposeMatrix];
|
||||
}
|
||||
@ -214,11 +206,7 @@ class Matrix
|
||||
|
||||
public static function add(Matrix $left, Matrix $right): Matrix
|
||||
{
|
||||
if (
|
||||
($left->getRowCount() != $right->getRowCount())
|
||||
|
||||
|| ($left->getColumnCount() != $right->getColumnCount())
|
||||
) {
|
||||
if (($left->getRowCount() != $right->getRowCount()) || ($left->getColumnCount() != $right->getColumnCount())) {
|
||||
throw new Exception('Matrices must be of the same size');
|
||||
}
|
||||
|
||||
|
@ -79,11 +79,7 @@ class GaussianWeightedSumFactor extends GaussianFactor
|
||||
// This is helpful since we skip over one of the spots
|
||||
$currentDestinationWeightIndex = 0;
|
||||
|
||||
for (
|
||||
$currentWeightSourceIndex = 0;
|
||||
$currentWeightSourceIndex < $variableWeightsLength;
|
||||
$currentWeightSourceIndex++
|
||||
) {
|
||||
for ($currentWeightSourceIndex = 0; $currentWeightSourceIndex < $variableWeightsLength; $currentWeightSourceIndex++) {
|
||||
if ($currentWeightSourceIndex === $weightsIndex - 1) {
|
||||
continue;
|
||||
}
|
||||
|
Reference in New Issue
Block a user