mirror of
https://github.com/Karaka-Management/phpOMS.git
synced 2026-01-14 02:58:40 +00:00
Fixed for documentor
This commit is contained in:
parent
704489a95e
commit
aca0e8ff08
|
|
@ -59,7 +59,7 @@ class FileCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000)
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000) : bool
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +73,7 @@ class FileCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($key, CacheStatus $type = null)
|
||||
public function delete($key, CacheStatus $type = null) : bool
|
||||
{
|
||||
}
|
||||
|
||||
|
|
@ -88,7 +88,7 @@ class FileCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1)
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1) : bool
|
||||
{
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ class MemCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000)
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000) : bool
|
||||
{
|
||||
return $this->memc->add($key, $value, false, $expire);
|
||||
}
|
||||
|
|
@ -98,7 +98,7 @@ class MemCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($key, CacheStatus $type = null)
|
||||
public function delete($key, CacheStatus $type = null) : bool
|
||||
{
|
||||
$this->memc->delete($key);
|
||||
}
|
||||
|
|
@ -114,7 +114,7 @@ class MemCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1)
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1) : bool
|
||||
{
|
||||
$this->memc->replace($key, $value, false, $expire);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -40,7 +40,7 @@ class NullCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000)
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000) : bool
|
||||
{
|
||||
// TODO: Implement add() method.
|
||||
}
|
||||
|
|
@ -56,7 +56,7 @@ class NullCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($key, CacheStatus $type = null)
|
||||
public function delete($key, CacheStatus $type = null) : bool
|
||||
{
|
||||
// TODO: Implement delete() method.
|
||||
}
|
||||
|
|
@ -72,7 +72,7 @@ class NullCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1)
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1) : bool
|
||||
{
|
||||
// TODO: Implement replace() method.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class RedisCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000)
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000) : bool
|
||||
{
|
||||
// TODO: Implement add() method.
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ class RedisCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($key, CacheStatus $type = null)
|
||||
public function delete($key, CacheStatus $type = null) : bool
|
||||
{
|
||||
// TODO: Implement delete() method.
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ class RedisCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1)
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1) : bool
|
||||
{
|
||||
// TODO: Implement replace() method.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@ class WinCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000)
|
||||
public function add($key, $value, CacheStatus $type = null, int $expire = 2592000) : bool
|
||||
{
|
||||
// TODO: Implement add() method.
|
||||
}
|
||||
|
|
@ -58,7 +58,7 @@ class WinCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function delete($key, CacheStatus $type = null)
|
||||
public function delete($key, CacheStatus $type = null) : bool
|
||||
{
|
||||
// TODO: Implement delete() method.
|
||||
}
|
||||
|
|
@ -74,7 +74,7 @@ class WinCache implements CacheInterface
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1)
|
||||
public function replace($key, $value, CacheType $type = null, int $expire = -1) : bool
|
||||
{
|
||||
// TODO: Implement replace() method.
|
||||
}
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connection;
|
||||
|
||||
abstract class ConnectionException extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connection;
|
||||
|
||||
abstract class PostgresConnection extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connection;
|
||||
|
||||
abstract class SqlServerConnection extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connector;
|
||||
|
||||
abstract class MysqlConnector extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connector;
|
||||
|
||||
abstract class PostgresConnector extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connector;
|
||||
|
||||
abstract class SqliteConnector extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Connector;
|
||||
|
||||
abstract class SqlServerConnector extends \Exception
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,23 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\DataStorage\Database\Query;
|
||||
|
||||
|
||||
class Expression
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -16,8 +16,6 @@
|
|||
|
||||
namespace phpOMS\DataStorage\Database\Query\Grammar;
|
||||
|
||||
use phpOMS\DataStorage\Database\Grammar;
|
||||
|
||||
class GrammarInterface extends Grammar
|
||||
class GrammarInterface
|
||||
{
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Schema;
|
||||
namespace phpOMS\DataStorage\Database\Schema\Grammar;
|
||||
|
||||
interface GrammarInterface
|
||||
{
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Schema\Grammar;
|
||||
|
||||
class PostgresGrammar
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Schema\Grammar;
|
||||
|
||||
class SQLiteGrammar
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\DataStorage\Database\Schema\Grammar;
|
||||
|
||||
class SqlServerGrammar
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\Datatypes\ExactFloat;
|
||||
namespace phpOMS\Datatypes;
|
||||
|
||||
class ExactFloat
|
||||
{
|
||||
|
|
@ -121,10 +121,4 @@ class ExactFloat
|
|||
public static function div($a, $b, $length = null)
|
||||
{
|
||||
}
|
||||
|
||||
public static function __toString()
|
||||
{
|
||||
return '';
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -93,7 +93,7 @@ class EventManager implements Mediator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function trigger(string $group, string $id = 0)
|
||||
public function trigger(string $group, string $id = '')
|
||||
{
|
||||
if(isset($this->groups[$group])) {
|
||||
unset($this->groups[$group][$id]);
|
||||
|
|
@ -119,7 +119,7 @@ class EventManager implements Mediator
|
|||
/**
|
||||
* {@inheritdoc}
|
||||
*/
|
||||
public function addGroup(string $group, $id)
|
||||
public function addGroup(string $group, string $id)
|
||||
{
|
||||
if(!isset($this->groups[$group])) {
|
||||
$this->groups[$group] = [];
|
||||
|
|
|
|||
|
|
@ -101,7 +101,6 @@ class ISO4217SymbolEnum extends Enum
|
|||
const _NZD = '$';
|
||||
const _NIO = 'C$';
|
||||
const _NGN = '₦';
|
||||
const _KPW = '₩';
|
||||
const _NOK = 'kr';
|
||||
const _OMR = '﷼';
|
||||
const _PKR = '₨';
|
||||
|
|
@ -121,7 +120,6 @@ class ISO4217SymbolEnum extends Enum
|
|||
const _SBD = '$';
|
||||
const _SOS = 'S';
|
||||
const _ZAR = 'R';
|
||||
const _KRW = '₩';
|
||||
const _LKR = '₨';
|
||||
const _SEK = 'kr';
|
||||
const _CHF = 'CHF';
|
||||
|
|
|
|||
|
|
@ -0,0 +1,21 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\Math\Finance;
|
||||
|
||||
class Depreciation
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class AR {
|
||||
|
||||
}
|
||||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class ARCH {
|
||||
|
||||
}
|
||||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class ARFIMA {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class ARIMA {
|
||||
public function __construct(array $data, int $order = 12) {
|
||||
if($order !== 12 && $order !== 4) {
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class ARMA {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
use phpOMS\Math\Statistic\Average;
|
||||
|
||||
class ClassicalDecomposition {
|
||||
const ADDITIVE = 0;
|
||||
const MULTIPLICATIVE = 1;
|
||||
|
|
@ -12,7 +16,7 @@ class ClassicalDecomposition {
|
|||
public function __construct(array $data, int $order, int $mode = self::ADDITIVE) {
|
||||
$this->mode = $mode;
|
||||
$this->data = $data;
|
||||
$this->order = $this->order;
|
||||
$this->order = $order;
|
||||
|
||||
$this->dataSize = count($data);
|
||||
}
|
||||
|
|
@ -20,7 +24,7 @@ class ClassicalDecomposition {
|
|||
public function getDecomposition() : array {
|
||||
$trendCycleComponent = self::computeTrendCycle($this->data, $this->order);
|
||||
$detrendedSeries = self::computeDetrendedSeries($this->data, $trendCycleComponent, $this->mode);
|
||||
$seasonalComponent = $this->computeSeasonalComponent($detrended, $this->order);
|
||||
$seasonalComponent = $this->computeSeasonalComponent($detrendedSeries, $this->order);
|
||||
$remainderComponent = $this->computeRemainderComponent($trendCycleComponent, $seasonalComponent);
|
||||
|
||||
return [
|
||||
|
|
@ -32,9 +36,9 @@ class ClassicalDecomposition {
|
|||
}
|
||||
|
||||
public static function computeTrendCycle(array $data, int $order) : array {
|
||||
$mMA = Average::totalMovingAverage($data, $order, null true);
|
||||
$mMA = Average::totalMovingAverage($data, $order, null, true);
|
||||
|
||||
return $this->order % 2 === 0 ? Average::totalMovingAverage($mMa, 2, null, true) : $mMA;
|
||||
return $order % 2 === 0 ? Average::totalMovingAverage($mMA, 2, null, true) : $mMA;
|
||||
}
|
||||
|
||||
public static function computeDetrendedSeries(array $data, array $trendCycleComponent, int $mode) : array {
|
||||
|
|
@ -74,7 +78,7 @@ class ClassicalDecomposition {
|
|||
|
||||
public static function computeRemainderComponent(array $trendCycleComponent, array $seasonalComponent) : array {
|
||||
$remainderComponent = [];
|
||||
$count = count($trendedCycleComponent);
|
||||
$count = count($trendCycleComponent);
|
||||
$start = self::getStartOfDecomposition($this->dataSize, $count);
|
||||
$seasons = count($seasonalComponent);
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class ExponentialSmoothing {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
|
||||
|
|
@ -1 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class GARCH {
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class MA {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class NAR {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class NMA {
|
||||
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Finance\Forecasting;
|
||||
|
||||
class SARIMA {
|
||||
|
||||
}
|
||||
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\Math\Integral;
|
||||
|
||||
class Gauss
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\Math\Matrix;
|
||||
|
||||
class Cholesky
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,2 +1,22 @@
|
|||
class Irrational implements Number {
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\Math\Number;
|
||||
|
||||
class Irrational
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -29,7 +29,7 @@ use phpOMS\Datatypes\Enum;
|
|||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
abstract class AccountType extends Enum
|
||||
abstract class NumberType extends Enum
|
||||
{
|
||||
const INTEGER = 1;
|
||||
const NATURAL = 21;
|
||||
|
|
|
|||
|
|
@ -91,8 +91,6 @@ interface OperationInterface
|
|||
/**
|
||||
* Abs of value.
|
||||
*
|
||||
* @param mixed $x Value
|
||||
*
|
||||
* @return mixed
|
||||
*
|
||||
* @since 1.0.0
|
||||
|
|
@ -1,3 +1,22 @@
|
|||
class Rational implements Number {
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\Math\Number;
|
||||
|
||||
class Rational
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -1,2 +1,22 @@
|
|||
class Real implements Number {
|
||||
<?php
|
||||
/**
|
||||
* Orange Management
|
||||
*
|
||||
* PHP Version 7.0
|
||||
*
|
||||
* @category TBD
|
||||
* @package TBD
|
||||
* @author OMS Development Team <dev@oms.com>
|
||||
* @author Dennis Eichhorn <d.eichhorn@oms.com>
|
||||
* @copyright 2013 Dennis Eichhorn
|
||||
* @license OMS License 1.0
|
||||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
|
||||
namespace phpOMS\Math\Number;
|
||||
|
||||
class Real
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -13,6 +13,7 @@
|
|||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\Math\Optimization;
|
||||
|
||||
use phpOMS\Math\Matrix\Matrix;
|
||||
|
||||
|
|
@ -59,7 +60,7 @@ class GaussianElimination
|
|||
}
|
||||
}
|
||||
|
||||
$this->swapRows($A, $b, $col, $j);
|
||||
self::swapRows($A, $b, $col, $j);
|
||||
|
||||
for ($i = $col + 1; $i < $limit; $i++) {
|
||||
$tmp = $A[$i][$col] / $A[$col][$col];
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Graph;
|
||||
|
||||
class FloydWarshall
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class Backpack
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class BruteForce
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class GA
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class Item
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class ItemPool
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\Knappsack;
|
||||
|
||||
class Population
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class BruteForce
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class GA
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class Population
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class Workday
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class Worker
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Optimization\ShiftScheduling;
|
||||
|
||||
class WorkerPool
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
namespace phpOMS\Math\Shape\D2;
|
||||
|
||||
class Quadrilateral implements D2ShapeInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,7 @@
|
|||
<?php
|
||||
namespace phpOMS\Math\Shape\D3;
|
||||
|
||||
class Prism implements D3ShapeInterface
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -35,7 +35,7 @@ class Average
|
|||
const MA2x12 = [5/6, 5/6, 5/6, 5/6, 5/6, 5/6, 0.42];
|
||||
const MA3x3 = [1/3, 2/9, 1/9];
|
||||
const MA3x5 = [0.2, 0.2, 2/15, 4/6];
|
||||
const MAS15 = [0.231, 0.209, 0.144, 2/3, 0.009, -0.016, -0.019, -0.009]
|
||||
const MAS15 = [0.231, 0.209, 0.144, 2/3, 0.009, -0.016, -0.019, -0.009];
|
||||
const MAS21 = [0.171, 0.163, 0.134, 0.37, 0.51, 0.017, -0.006, -0.014, -0.014, -0.009, -0.003];
|
||||
const MAH5 = [0.558, 0.294, -0.73];
|
||||
const MAH9 = [0.330, 0.267, 0.119, -0.010, -0.041];
|
||||
|
|
@ -110,7 +110,9 @@ class Average
|
|||
*/
|
||||
public static function movingAverage(array $x, int $t, int $order, array $weight = null, bool $symmetric = false) : float {
|
||||
$periods = (int) ($order / 2);
|
||||
if($t < $periods || ($count = count($x)) < $periods) || ($symmetric && $t + $periods < $count)) {
|
||||
$count = count($x);
|
||||
|
||||
if($t < $periods || ($count < $periods) || ($symmetric && $t + $periods < $count)) {
|
||||
throw new \Exception('Periods');
|
||||
}
|
||||
|
||||
|
|
@ -259,6 +261,18 @@ class Average
|
|||
*/
|
||||
public static function harmonicMean(array $values, int $offset = 0)
|
||||
{
|
||||
sort($values);
|
||||
|
||||
if ($offset > 0) {
|
||||
$values = array_slice($values, $offset, -$offset);
|
||||
}
|
||||
|
||||
$count = count($values);
|
||||
$sum = 0.0;
|
||||
|
||||
foreach ($values as $value) {
|
||||
if ($value === 0) {
|
||||
throw new \Exception('Division zero');
|
||||
}
|
||||
|
||||
$sum += 1 / $value;
|
||||
|
|
|
|||
|
|
@ -192,7 +192,7 @@ class Error
|
|||
}
|
||||
|
||||
public static function getRBarSquared(float $R, int $observations, int $predictors) : float {
|
||||
return 1 - (1 - $R * ($observations - 1) / ($observations - $predictors - 1);
|
||||
return 1 - (1 - $R * ($observations - 1) / ($observations - $predictors - 1));
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
@ -208,7 +208,7 @@ class Error
|
|||
*
|
||||
* Correction for small amount of observations
|
||||
*/
|
||||
public static function getCorrectedAkaikeInformationCriterion(float aic, int $observations, int $predictors) : float {
|
||||
public static function getCorrectedAkaikeInformationCriterion(float $aic, int $observations, int $predictors) : float {
|
||||
return $aic + (2*($predictors +2)*($predictors + 3)) / ($observations - $predictors - 3);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -26,13 +26,11 @@ namespace phpOMS\Math\Statistic\Forecast;
|
|||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class Forecast
|
||||
class Forecasts
|
||||
{
|
||||
/**
|
||||
* Get forecast interval.
|
||||
*
|
||||
*
|
||||
*
|
||||
* @param array $observed Dataset
|
||||
* @param array $forecasted Forecasted
|
||||
*
|
||||
|
|
|
|||
|
|
@ -1,5 +1,7 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Statistic\Forecast\Regression;
|
||||
|
||||
class MultipleLinearRegression {
|
||||
public static function getRegression(array $x, array $y) : array {
|
||||
$X = new Matrix(count($x), count($x[0]));
|
||||
|
|
|
|||
|
|
@ -1,6 +1,12 @@
|
|||
<?php
|
||||
<?php
|
||||
|
||||
class RegressionAbstract {
|
||||
namespace phpOMS\Math\Statistic\Forecast\Regression;
|
||||
|
||||
use phpOMS\Math\Statistic\Average;
|
||||
use phpOMS\Math\Statistic\Forecast\ForecastIntervalMultiplier;
|
||||
use phpOMS\Math\Statistic\MeasureOfDispersion;
|
||||
|
||||
abstract class RegressionAbstract {
|
||||
/**
|
||||
* Get linear regression based on scatter plot.
|
||||
*
|
||||
|
|
@ -123,13 +129,7 @@ class RegressionAbstract {
|
|||
return Average::arithmeticMean($y) - $b1 * Average::arithmeticMean($x);
|
||||
}
|
||||
|
||||
abstract public static function getRegression(array $x, array $y) : array;
|
||||
|
||||
abstract public static function getSlope(float $b1, float $y, float $x) : float;
|
||||
|
||||
abstract public static function getElasticity(float $b1, float $y, float $x): float;
|
||||
|
||||
abstract public static function getBeta0(array $x, array $y, float b1) : float;
|
||||
|
||||
abstract public static function getBeta1(array $x, array $y) : float;
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ namespace phpOMS\Math\Stochastic\Distribution;
|
|||
* @link http://orange-management.com
|
||||
* @since 1.0.0
|
||||
*/
|
||||
class BernulliDistribution
|
||||
class BernoulliDistribution
|
||||
{
|
||||
/**
|
||||
* Get probability mass function.
|
||||
|
|
|
|||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class BetaDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class FDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class GammaDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class HypergeometricDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class LogDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class LogNormalDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class LogisticDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class ParetoDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class TDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Math\Stochastic\Distribution;
|
||||
|
||||
class WeibullDistribution
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Message\Mail;
|
||||
|
||||
class OAuth
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Message\Mail;
|
||||
|
||||
class Pop3
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Message\Mail;
|
||||
|
||||
class Smtp
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Message\Socket;
|
||||
|
||||
class Request
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace phpOMS\Message\Socket;
|
||||
|
||||
class Response
|
||||
{
|
||||
|
||||
}
|
||||
|
|
@ -13,7 +13,7 @@
|
|||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace Psr\Http\Message;
|
||||
namespace phpOMS\Message;
|
||||
|
||||
/**
|
||||
* Upload interface.
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
* @version 1.0.0
|
||||
* @link http://orange-management.com
|
||||
*/
|
||||
namespace phpOMS\Stdlib\Map;
|
||||
namespace phpOMS\Stdlib\Collection;
|
||||
|
||||
/**
|
||||
* Multimap utils.
|
||||
|
|
|
|||
|
|
@ -59,7 +59,7 @@ class Directory extends FileAbstract implements \Iterator, \ArrayAccess
|
|||
*/
|
||||
public function __construct(string $path, string $filter = '*')
|
||||
{
|
||||
$this->filter = $filter;
|
||||
$this->filter = ltrim($filter, '\\/');
|
||||
parent::__construct($path);
|
||||
|
||||
if (file_exists($this->path)) {
|
||||
|
|
|
|||
|
|
@ -89,7 +89,7 @@ class C128c extends C128Abstract
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn
|
||||
*/
|
||||
protected function generateCodeString()
|
||||
protected function generateCodeString() : string
|
||||
{
|
||||
$keys = array_keys(self::$CODEARRAY);
|
||||
$values = array_flip($keys);
|
||||
|
|
|
|||
|
|
@ -110,7 +110,7 @@ class C25 extends C128Abstract
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn
|
||||
*/
|
||||
protected function generateCodeString()
|
||||
protected function generateCodeString() : string
|
||||
{
|
||||
$codeString = '';
|
||||
$length = strlen($this->content);
|
||||
|
|
|
|||
|
|
@ -101,7 +101,7 @@ class C39 extends C128Abstract
|
|||
* @since 1.0.0
|
||||
* @author Dennis Eichhorn
|
||||
*/
|
||||
protected function generateCodeString()
|
||||
protected function generateCodeString() : string
|
||||
{
|
||||
$codeString = '';
|
||||
$length = strlen($this->content);
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user