More code standards

This commit is contained in:
2024-02-02 14:53:38 +00:00
parent 968c78d989
commit 3dddfc05db
46 changed files with 156 additions and 55 deletions

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
use DNW\Skills\Guard;
@ -94,6 +96,7 @@ abstract class Factor implements \Stringable
/**
* Sends the ith message to the marginal and returns the log-normalization constant
*
* @throws Exception
*/
public function sendMessageIndex(int $messageIndex): float|int

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
use DNW\Skills\FactorGraphs\ScheduleSequence;
@ -42,6 +44,7 @@ abstract class FactorGraphLayer
/**
* This reference is still needed
*
* @return array<int,array<int,object>>
*/
public function &getOutputVariablesGroups(): array
@ -82,11 +85,11 @@ abstract class FactorGraphLayer
public function createPriorSchedule(): ?ScheduleSequence
{
return null;
return NULL;
}
public function createPosteriorSchedule(): ?ScheduleSequence
{
return null;
return NULL;
}
}

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
/**

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
class ScheduleLoop extends Schedule

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
class ScheduleSequence extends Schedule

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
class ScheduleStep extends Schedule

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
use DNW\Skills\Numerics\GaussianDistribution;

View File

@ -1,5 +1,7 @@
<?php
declare(strict_types=1);
namespace DNW\Skills\FactorGraphs;
class VariableFactory