mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-02-17 08:58:41 +00:00
code fixes
This commit is contained in:
parent
513fa7bf8b
commit
0b5d51f9b8
|
|
@ -177,7 +177,7 @@ final class MarkovChain
|
|||
|
||||
$prob = 1.0;
|
||||
for ($i = $this->order; $i < $length; ++$i) {
|
||||
$prob *= $this->data[\implode($key)][$path[$i]] ?? 0.0;
|
||||
$prob *= $this->data[\implode(' ', $key)][$path[$i]] ?? 0.0;
|
||||
|
||||
$key[] = $path[$i];
|
||||
\array_shift($key);
|
||||
|
|
|
|||
|
|
@ -433,7 +433,7 @@ final class ReadMapper extends DataMapperAbstract
|
|||
$query = $this->getQuery(
|
||||
null,
|
||||
[
|
||||
'COUNT(' . (empty($this->columns) ? '*' : \implode($this->columns)) . ')' => 'count'
|
||||
'COUNT(' . (empty($this->columns) ? '*' : \implode(',', $this->columns)) . ')' => 'count',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
@ -452,7 +452,7 @@ final class ReadMapper extends DataMapperAbstract
|
|||
$query = $this->getQuery(
|
||||
null,
|
||||
[
|
||||
'SUM(' . (empty($this->columns) ? '*' : \implode($this->columns)) . ')' => 'sum'
|
||||
'SUM(' . (empty($this->columns) ? '*' : \implode(',', $this->columns)) . ')' => 'sum',
|
||||
]
|
||||
);
|
||||
|
||||
|
|
|
|||
|
|
@ -106,9 +106,9 @@ final class GrahamScan
|
|||
/**
|
||||
* Counterclockwise rotation
|
||||
*
|
||||
* @param array<x:int|float, y:int|float> $a Vector
|
||||
* @param array<x:int|float, y:int|float> $b Vector
|
||||
* @param array<x:int|float, y:int|float> $c Vector
|
||||
* @param array{x:int|float, y:int|float} $a Vector
|
||||
* @param array{x:int|float, y:int|float} $b Vector
|
||||
* @param array{x:int|float, y:int|float} $c Vector
|
||||
*
|
||||
* @return int|float
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ namespace phpOMS\Math\Optimization;
|
|||
class Simplex
|
||||
{
|
||||
private int $m = 0;
|
||||
|
||||
private int $n = 0;
|
||||
|
||||
private array $A = [];
|
||||
|
|
@ -40,7 +41,7 @@ class Simplex
|
|||
|
||||
private array $Nonbasic = [];
|
||||
|
||||
private function pivot (int $x, int $y)
|
||||
private function pivot (int $x, int $y) : void
|
||||
{
|
||||
for ($j = 0; $j < $this->n; ++$j) {
|
||||
if ($j !== $y) {
|
||||
|
|
|
|||
|
|
@ -185,7 +185,7 @@ class BinarySearchTree
|
|||
|
||||
if ($comparison < 0) {
|
||||
if ($current->left === null) {
|
||||
$BST = new BinarySearchTree();
|
||||
$BST = new self();
|
||||
$new = new Node($node->key, $node->data);
|
||||
$new->parent = $current;
|
||||
$new->tree = $BST;
|
||||
|
|
@ -197,7 +197,7 @@ class BinarySearchTree
|
|||
}
|
||||
} elseif ($comparison > 0) {
|
||||
if ($current->right === null) {
|
||||
$BST = new BinarySearchTree();
|
||||
$BST = new self();
|
||||
$new = new Node($node->key, $node->data);
|
||||
$new->parent = $current;
|
||||
$new->tree = $BST;
|
||||
|
|
|
|||
|
|
@ -14,9 +14,9 @@ declare(strict_types=1);
|
|||
|
||||
namespace phpOMS\tests\Utils\IO\Spreadsheet;
|
||||
|
||||
use phpOMS\tests\Autoloader;
|
||||
use phpOMS\DataStorage\Database\Connection\SQLiteConnection;
|
||||
use phpOMS\DataStorage\Database\Query\Builder;
|
||||
use phpOMS\tests\Autoloader;
|
||||
use phpOMS\Utils\IO\Spreadsheet\SpreadsheetDatabaseMapper;
|
||||
use phpOMS\Utils\StringUtils;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user