From 33dfc42aa6cacbbb339960b306f98922077d313a Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Mon, 15 Feb 2021 11:05:25 +0100 Subject: initial package open https://github.com/RubixML/Tensor/pull/11 check for openblas headers open https://github.com/RubixML/Tensor/issues/12 PHP 8 compatibility --- .gitignore | 9 + Makefile | 4 + PHPINFO | 10 + REFLECTION | 4042 ++++++++++++++++++++++++++++++++++++++++++++++++++ php-pecl-tensor.spec | 211 +++ tensor-headers.patch | 39 + tensor-libs.patch | 15 + 7 files changed, 4330 insertions(+) create mode 100644 .gitignore create mode 100644 Makefile create mode 100644 PHPINFO create mode 100644 REFLECTION create mode 100644 php-pecl-tensor.spec create mode 100644 tensor-headers.patch create mode 100644 tensor-libs.patch diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..01f0400 --- /dev/null +++ b/.gitignore @@ -0,0 +1,9 @@ +clog +package-*.xml +*.tgz +*.tar.bz2 +*.tar.gz +*.tar.xz +*.tar.xz.asc +*.src.rpm +*/*rpm diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..13af741 --- /dev/null +++ b/Makefile @@ -0,0 +1,4 @@ +SRCDIR := $(shell pwd) +NAME := $(shell basename $(SRCDIR)) +include ../../../common/Makefile + diff --git a/PHPINFO b/PHPINFO new file mode 100644 index 0000000..1b25119 --- /dev/null +++ b/PHPINFO @@ -0,0 +1,10 @@ + +tensor + + +Tensor is a library and extension that provides objects for scientific computing in PHP. +tensor => enabled +Author => Andrew DalPino +Version => 2.1.3 +Build Date => Feb 15 2021 00:00:00 +Powered by Zephir => Version 0.12.20-$Id$ diff --git a/REFLECTION b/REFLECTION new file mode 100644 index 0000000..9f7ed85 --- /dev/null +++ b/REFLECTION @@ -0,0 +1,4042 @@ +Extension [ extension #105 tensor version 2.1.3 ] { + + - Dependencies { + } + + - Classes [15] { + Interface [ interface Tensor\Arithmetic ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [6] { + Method [ abstract public method multiply ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method divide ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method add ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method subtract ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method pow ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method mod ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + } + } + + Interface [ interface Tensor\ArrayLike extends ArrayAccess, IteratorAggregate, Traversable, Countable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [9] { + Method [ abstract public method shape ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ abstract public method size ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ abstract public method asArray ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ abstract public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $offset ] + Parameter #1 [ $value ] + } + } + + Method [ abstract public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method getIterator ] { + } + + Method [ abstract public method count ] { + + - Parameters [0] { + } + } + } + } + + Interface [ interface Tensor\Comparable ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [6] { + Method [ abstract public method equal ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method notEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method greater ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method greaterEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method less ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method lessEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + } + } + + Interface [ interface Tensor\Functional ] { + + - Constants [1] { + Constant [ public float M_E ] { 2.718281828459 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [16] { + Method [ abstract public method abs ] { + } + + Method [ abstract public method square ] { + } + + Method [ abstract public method sqrt ] { + } + + Method [ abstract public method exp ] { + } + + Method [ abstract public method expm1 ] { + } + + Method [ abstract public method log ] { + + - Parameters [1] { + Parameter #0 [ float $base ] + } + } + + Method [ abstract public method log1p ] { + } + + Method [ abstract public method sum ] { + } + + Method [ abstract public method product ] { + } + + Method [ abstract public method min ] { + } + + Method [ abstract public method max ] { + } + + Method [ abstract public method round ] { + + - Parameters [1] { + Parameter #0 [ int $precision ] + } + } + + Method [ abstract public method floor ] { + } + + Method [ abstract public method ceil ] { + } + + Method [ abstract public method sign ] { + } + + Method [ abstract public method negate ] { + } + } + } + + Interface [ interface Tensor\Statistical ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [4] { + Method [ abstract public method mean ] { + } + + Method [ abstract public method variance ] { + + - Parameters [1] { + Parameter #0 [ $mean ] + } + } + + Method [ abstract public method median ] { + } + + Method [ abstract public method quantile ] { + + - Parameters [1] { + Parameter #0 [ float $q ] + } + } + } + } + + Interface [ interface Tensor\Trigonometric ] { + + - Constants [2] { + Constant [ public float M_PI ] { 3.1415926535898 } + Constant [ public float TWO_PI ] { 6.28318530718 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [8] { + Method [ abstract public method sin ] { + } + + Method [ abstract public method asin ] { + } + + Method [ abstract public method cos ] { + } + + Method [ abstract public method acos ] { + } + + Method [ abstract public method tan ] { + } + + Method [ abstract public method atan ] { + } + + Method [ abstract public method rad2deg ] { + } + + Method [ abstract public method deg2rad ] { + } + } + } + + Interface [ interface Tensor\Tensor extends Tensor\ArrayLike, Countable, Traversable, IteratorAggregate, ArrayAccess, Tensor\Arithmetic, Tensor\Comparable, Tensor\Functional, Tensor\Trigonometric, Tensor\Statistical ] { + + - Constants [4] { + Constant [ public float EPSILON ] { 1.0E-8 } + Constant [ public float M_E ] { 2.718281828459 } + Constant [ public float M_PI ] { 3.1415926535898 } + Constant [ public float TWO_PI ] { 6.28318530718 } + } + + - Static properties [0] { + } + + - Static methods [0] { + } + + - Properties [0] { + } + + - Methods [57] { + Method [ abstract public method map ] { + + - Parameters [1] { + Parameter #0 [ $callback ] + } + } + + Method [ abstract public method reduce ] { + + - Parameters [2] { + Parameter #0 [ $callback ] + Parameter #1 [ $initial ] + } + } + + Method [ abstract public method transpose ] { + } + + Method [ abstract public method clip ] { + + - Parameters [2] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + } + } + + Method [ abstract public method clipLower ] { + + - Parameters [1] { + Parameter #0 [ float $min ] + } + } + + Method [ abstract public method clipUpper ] { + + - Parameters [1] { + Parameter #0 [ float $max ] + } + } + + Method [ abstract public method shapeString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ abstract public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ abstract public method shape ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ abstract public method size ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ abstract public method asArray ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ abstract public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $offset ] + Parameter #1 [ $value ] + } + } + + Method [ abstract public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $offset ] + } + } + + Method [ abstract public method getIterator ] { + } + + Method [ abstract public method count ] { + + - Parameters [0] { + } + } + + Method [ abstract public method multiply ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method divide ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method add ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method subtract ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method pow ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method mod ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method equal ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method notEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method greater ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method greaterEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method less ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method lessEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ abstract public method abs ] { + } + + Method [ abstract public method square ] { + } + + Method [ abstract public method sqrt ] { + } + + Method [ abstract public method exp ] { + } + + Method [ abstract public method expm1 ] { + } + + Method [ abstract public method log ] { + + - Parameters [1] { + Parameter #0 [ float $base ] + } + } + + Method [ abstract public method log1p ] { + } + + Method [ abstract public method sum ] { + } + + Method [ abstract public method product ] { + } + + Method [ abstract public method min ] { + } + + Method [ abstract public method max ] { + } + + Method [ abstract public method round ] { + + - Parameters [1] { + Parameter #0 [ int $precision ] + } + } + + Method [ abstract public method floor ] { + } + + Method [ abstract public method ceil ] { + } + + Method [ abstract public method sign ] { + } + + Method [ abstract public method negate ] { + } + + Method [ abstract public method sin ] { + } + + Method [ abstract public method asin ] { + } + + Method [ abstract public method cos ] { + } + + Method [ abstract public method acos ] { + } + + Method [ abstract public method tan ] { + } + + Method [ abstract public method atan ] { + } + + Method [ abstract public method rad2deg ] { + } + + Method [ abstract public method deg2rad ] { + } + + Method [ abstract public method mean ] { + } + + Method [ abstract public method variance ] { + + - Parameters [1] { + Parameter #0 [ $mean ] + } + } + + Method [ abstract public method median ] { + } + + Method [ abstract public method quantile ] { + + - Parameters [1] { + Parameter #0 [ float $q ] + } + } + } + } + + Class [ class Tensor\Vector implements Tensor\Tensor, Tensor\Statistical, Tensor\Trigonometric, Tensor\Functional, Tensor\Comparable, Tensor\Arithmetic, ArrayAccess, IteratorAggregate, Traversable, Countable, Tensor\ArrayLike ] { + + - Constants [4] { + Constant [ public float EPSILON ] { 1.0E-8 } + Constant [ public float M_E ] { 2.718281828459 } + Constant [ public float M_PI ] { 3.1415926535898 } + Constant [ public float TWO_PI ] { 6.28318530718 } + } + + - Static properties [0] { + } + + - Static methods [13] { + Method [ static public method build ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + } + + Method [ static public method quick ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + } + + Method [ static public method zeros ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method ones ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method fill ] { + + - Parameters [2] { + Parameter #0 [ $value ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method rand ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method gaussian ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method poisson ] { + + - Parameters [2] { + Parameter #0 [ int $n ] + Parameter #1 [ float $lambda ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method uniform ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method range ] { + + - Parameters [3] { + Parameter #0 [ $start ] + Parameter #1 [ $end ] + Parameter #2 [ $interval ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method linspace ] { + + - Parameters [3] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + Parameter #2 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method maximum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $a ] + Parameter #1 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method minimum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $a ] + Parameter #1 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + } + + - Properties [2] { + Property [ protected $a ] + Property [ protected $n ] + } + + - Methods [113] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ array $a ] + Parameter #1 [ bool $validate ] + } + } + + Method [ public method shape ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method shapeString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ public method size ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method m ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method n ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method asArray ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method asRowMatrix ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method asColumnMatrix ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method reshape ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method transpose ] { + } + + Method [ public method argmin ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method argmax ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method map ] { + + - Parameters [1] { + Parameter #0 [ $callback ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method reduce ] { + + - Parameters [2] { + Parameter #0 [ $callback ] + Parameter #1 [ $initial ] + } + } + + Method [ public method dot ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ float ] + } + + Method [ public method convolve ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $b ] + Parameter #1 [ int $stride ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method matmul ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method inner ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + } + + Method [ public method outer ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method cross ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method project ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method l1Norm ] { + } + + Method [ public method l2Norm ] { + } + + Method [ public method pNorm ] { + + - Parameters [1] { + Parameter #0 [ float $p ] + } + } + + Method [ public method maxNorm ] { + } + + Method [ public method multiply ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method divide ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method add ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method subtract ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method pow ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method mod ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method equal ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method notEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greater ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greaterEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method less ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method lessEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method reciprocal ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method abs ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method square ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sqrt ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method exp ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method expm1 ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method log ] { + + - Parameters [1] { + Parameter #0 [ float $base ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method log1p ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sin ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method asin ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method cos ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method acos ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method tan ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method atan ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method rad2deg ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method deg2rad ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sum ] { + } + + Method [ public method product ] { + } + + Method [ public method min ] { + } + + Method [ public method max ] { + } + + Method [ public method mean ] { + } + + Method [ public method median ] { + } + + Method [ public method quantile ] { + + - Parameters [1] { + Parameter #0 [ float $q ] + } + } + + Method [ public method variance ] { + + - Parameters [1] { + Parameter #0 [ $mean ] + } + } + + Method [ public method round ] { + + - Parameters [1] { + Parameter #0 [ int $precision ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method floor ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method ceil ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method clip ] { + + - Parameters [2] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method clipLower ] { + + - Parameters [1] { + Parameter #0 [ float $min ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method clipUpper ] { + + - Parameters [1] { + Parameter #0 [ float $max ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method sign ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method negate ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method multiplyMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method divideVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method addVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method subtractVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method powVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method modVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method equalVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method notEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method multiplyScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method divideScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method addScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method subtractScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method powScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method modScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method equalScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method notEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method count ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $index ] + Parameter #1 [ $values ] + } + - Return [ void ] + } + + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ bool ] + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ void ] + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + } + + Method [ public method getIterator ] { + } + + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] + } + } + } + + Class [ class Tensor\ColumnVector extends Tensor\Vector implements Tensor\ArrayLike, Countable, Traversable, IteratorAggregate, ArrayAccess, Tensor\Arithmetic, Tensor\Comparable, Tensor\Functional, Tensor\Trigonometric, Tensor\Statistical, Tensor\Tensor ] { + + - Constants [4] { + Constant [ public float EPSILON ] { 1.0E-8 } + Constant [ public float M_E ] { 2.718281828459 } + Constant [ public float M_PI ] { 3.1415926535898 } + Constant [ public float TWO_PI ] { 6.28318530718 } + } + + - Static properties [0] { + } + + - Static methods [13] { + Method [ static public method build ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + } + + Method [ static public method quick ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + } + + Method [ static public method zeros ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method ones ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method fill ] { + + - Parameters [2] { + Parameter #0 [ $value ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method rand ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method gaussian ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method poisson ] { + + - Parameters [2] { + Parameter #0 [ int $n ] + Parameter #1 [ float $lambda ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method uniform ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method range ] { + + - Parameters [3] { + Parameter #0 [ $start ] + Parameter #1 [ $end ] + Parameter #2 [ $interval ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method linspace ] { + + - Parameters [3] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + Parameter #2 [ int $n ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method maximum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $a ] + Parameter #1 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ static public method minimum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $a ] + Parameter #1 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + } + + - Properties [2] { + Property [ protected $a ] + Property [ protected $n ] + } + + - Methods [113] { + Method [ public method m ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method n ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method transpose ] { + } + + Method [ public method matmul ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ array $a ] + Parameter #1 [ bool $validate ] + } + } + + Method [ public method shape ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method shapeString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ public method size ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method asArray ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method asRowMatrix ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method asColumnMatrix ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method reshape ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method argmin ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method argmax ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method map ] { + + - Parameters [1] { + Parameter #0 [ $callback ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method reduce ] { + + - Parameters [2] { + Parameter #0 [ $callback ] + Parameter #1 [ $initial ] + } + } + + Method [ public method dot ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ float ] + } + + Method [ public method convolve ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Vector $b ] + Parameter #1 [ int $stride ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method inner ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + } + + Method [ public method outer ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method cross ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method project ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method l1Norm ] { + } + + Method [ public method l2Norm ] { + } + + Method [ public method pNorm ] { + + - Parameters [1] { + Parameter #0 [ float $p ] + } + } + + Method [ public method maxNorm ] { + } + + Method [ public method multiply ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method divide ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method add ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method subtract ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method pow ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method mod ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method equal ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method notEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greater ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greaterEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method less ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method lessEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method reciprocal ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method abs ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method square ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sqrt ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method exp ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method expm1 ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method log ] { + + - Parameters [1] { + Parameter #0 [ float $base ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method log1p ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sin ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method asin ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method cos ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method acos ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method tan ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method atan ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method rad2deg ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method deg2rad ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method sum ] { + } + + Method [ public method product ] { + } + + Method [ public method min ] { + } + + Method [ public method max ] { + } + + Method [ public method mean ] { + } + + Method [ public method median ] { + } + + Method [ public method quantile ] { + + - Parameters [1] { + Parameter #0 [ float $q ] + } + } + + Method [ public method variance ] { + + - Parameters [1] { + Parameter #0 [ $mean ] + } + } + + Method [ public method round ] { + + - Parameters [1] { + Parameter #0 [ int $precision ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method floor ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method ceil ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method clip ] { + + - Parameters [2] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method clipLower ] { + + - Parameters [1] { + Parameter #0 [ float $min ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method clipUpper ] { + + - Parameters [1] { + Parameter #0 [ float $max ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method sign ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method negate ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method multiplyVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method divideVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method addVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method subtractVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method powVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method modVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method equalVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method notEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method multiplyScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method divideScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method addScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method subtractScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method powScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method modScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method equalScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method notEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method greaterEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method lessEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method count ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $index ] + Parameter #1 [ $values ] + } + - Return [ void ] + } + + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ bool ] + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ void ] + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + } + + Method [ public method getIterator ] { + } + + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] + } + } + } + + Class [ class Tensor\Decompositions\Cholesky ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [1] { + Method [ static public method decompose ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Decompositions\Cholesky ] + } + } + + - Properties [1] { + Property [ protected $l ] + } + + - Methods [3] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $l ] + } + } + + Method [ public method l ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lT ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + } + } + + Class [ class Tensor\Decompositions\Lu ] { + + - Constants [1] { + Constant [ public float EPSILON ] { 1.0E-8 } + } + + - Static properties [0] { + } + + - Static methods [1] { + Method [ static public method decompose ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Decompositions\Lu ] + } + } + + - Properties [3] { + Property [ protected $l ] + Property [ protected $u ] + Property [ protected $p ] + } + + - Methods [4] { + Method [ public method __construct ] { + + - Parameters [3] { + Parameter #0 [ Tensor\Matrix $l ] + Parameter #1 [ Tensor\Matrix $u ] + Parameter #2 [ Tensor\Matrix $p ] + } + } + + Method [ public method l ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method u ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method p ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + } + } + + Class [ class Tensor\Matrix implements Tensor\Tensor, Tensor\Statistical, Tensor\Trigonometric, Tensor\Functional, Tensor\Comparable, Tensor\Arithmetic, ArrayAccess, IteratorAggregate, Traversable, Countable, Tensor\ArrayLike ] { + + - Constants [4] { + Constant [ public float EPSILON ] { 1.0E-8 } + Constant [ public float M_E ] { 2.718281828459 } + Constant [ public float M_PI ] { 3.1415926535898 } + Constant [ public float TWO_PI ] { 6.28318530718 } + } + + - Static properties [0] { + } + + - Static methods [15] { + Method [ static public method build ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method quick ] { + + - Parameters [1] { + Parameter #0 [ array $a ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method identity ] { + + - Parameters [1] { + Parameter #0 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method zeros ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method ones ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method diagonal ] { + + - Parameters [1] { + Parameter #0 [ array $elements ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method fill ] { + + - Parameters [3] { + Parameter #0 [ $value ] + Parameter #1 [ int $m ] + Parameter #2 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method rand ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method gaussian ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method poisson ] { + + - Parameters [3] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + Parameter #2 [ float $lambda ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method uniform ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method minimum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Matrix $a ] + Parameter #1 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method maximum ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Matrix $a ] + Parameter #1 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static public method stack ] { + + - Parameters [1] { + Parameter #0 [ array $vectors ] + } + - Return [ Tensor\Matrix ] + } + + Method [ static protected method implodeRow ] { + + - Parameters [2] { + Parameter #0 [ string $carry ] + Parameter #1 [ array $row ] + } + - Return [ string ] + } + } + + - Properties [3] { + Property [ protected $a ] + Property [ protected $m ] + Property [ protected $n ] + } + + - Methods [148] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ array $a ] + Parameter #1 [ bool $validate ] + } + } + + Method [ public method shape ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method shapeString ] { + + - Parameters [0] { + } + - Return [ string ] + } + + Method [ public method isSquare ] { + + - Parameters [0] { + } + - Return [ bool ] + } + + Method [ public method size ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method m ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method n ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method row ] { + + - Parameters [1] { + Parameter #0 [ int $index ] + } + - Return [ array ] + } + + Method [ public method rowAsVector ] { + + - Parameters [1] { + Parameter #0 [ int $index ] + } + - Return [ Tensor\Vector ] + } + + Method [ public method column ] { + + - Parameters [1] { + Parameter #0 [ int $index ] + } + - Return [ array ] + } + + Method [ public method columnAsVector ] { + + - Parameters [1] { + Parameter #0 [ int $index ] + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method diagonalAsVector ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method asArray ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method asVectors ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method asColumnVectors ] { + + - Parameters [0] { + } + - Return [ array ] + } + + Method [ public method flatten ] { + + - Parameters [0] { + } + - Return [ Tensor\Vector ] + } + + Method [ public method argmin ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method argmax ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method map ] { + + - Parameters [1] { + Parameter #0 [ $callback ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method reduce ] { + + - Parameters [2] { + Parameter #0 [ $callback ] + Parameter #1 [ $initial ] + } + } + + Method [ public method transpose ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method inverse ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method det ] { + } + + Method [ public method rank ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method fullRank ] { + + - Parameters [0] { + } + - Return [ bool ] + } + + Method [ public method symmetric ] { + + - Parameters [0] { + } + - Return [ bool ] + } + + Method [ public method positiveDefinite ] { + + - Parameters [0] { + } + - Return [ bool ] + } + + Method [ public method positiveSemidefinite ] { + + - Parameters [0] { + } + - Return [ bool ] + } + + Method [ public method matmul ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method dot ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method convolve ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Matrix $b ] + Parameter #1 [ int $stride ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method ref ] { + + - Parameters [0] { + } + - Return [ Tensor\Reductions\Ref ] + } + + Method [ public method rref ] { + + - Parameters [0] { + } + - Return [ Tensor\Reductions\Rref ] + } + + Method [ public method lu ] { + + - Parameters [0] { + } + - Return [ Tensor\Decompositions\Lu ] + } + + Method [ public method cholesky ] { + + - Parameters [0] { + } + - Return [ Tensor\Decompositions\Cholesky ] + } + + Method [ public method eig ] { + + - Parameters [1] { + Parameter #0 [ bool $normalize ] + } + - Return [ Tensor\Eigen ] + } + + Method [ public method solve ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method l1Norm ] { + } + + Method [ public method l2Norm ] { + } + + Method [ public method infinityNorm ] { + } + + Method [ public method maxNorm ] { + } + + Method [ public method multiply ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method divide ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method add ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method subtract ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method pow ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method mod ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method equal ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method notEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greater ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method greaterEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method less ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method lessEqual ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + } + + Method [ public method reciprocal ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method abs ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method square ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method sqrt ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method exp ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method expm1 ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method log ] { + + - Parameters [1] { + Parameter #0 [ float $base ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method log1p ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method sin ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method asin ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method cos ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method acos ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method tan ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method atan ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method rad2deg ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method deg2rad ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method sum ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method product ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method min ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method max ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method mean ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method median ] { + + - Parameters [0] { + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method quantile ] { + + - Parameters [1] { + Parameter #0 [ float $q ] + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method variance ] { + + - Parameters [1] { + Parameter #0 [ $mean ] + } + - Return [ Tensor\ColumnVector ] + } + + Method [ public method covariance ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector or NULL $mean ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method round ] { + + - Parameters [1] { + Parameter #0 [ int $precision ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method floor ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method ceil ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method clip ] { + + - Parameters [2] { + Parameter #0 [ float $min ] + Parameter #1 [ float $max ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method clipLower ] { + + - Parameters [1] { + Parameter #0 [ float $min ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method clipUpper ] { + + - Parameters [1] { + Parameter #0 [ float $max ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method sign ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method negate ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method insert ] { + + - Parameters [3] { + Parameter #0 [ Tensor\Matrix $b ] + Parameter #1 [ int $rowOffset ] + Parameter #2 [ int $columnOffset ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subMatrix ] { + + - Parameters [4] { + Parameter #0 [ int $startRow ] + Parameter #1 [ int $startColumn ] + Parameter #2 [ int $endRow ] + Parameter #3 [ int $endColumn ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method augmentAbove ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method augmentBelow ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method augmentLeft ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method augmentRight ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method repeat ] { + + - Parameters [2] { + Parameter #0 [ int $m ] + Parameter #1 [ int $n ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualMatrix ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Vector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualColumnVector ] { + + - Parameters [1] { + Parameter #0 [ Tensor\ColumnVector $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method multiplyScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method divideScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method addScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method subtractScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method powScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method modScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method equalScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method notEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method greaterEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method lessEqualScalar ] { + + - Parameters [1] { + Parameter #0 [ $b ] + } + - Return [ Tensor\Matrix ] + } + + Method [ public method count ] { + + - Parameters [0] { + } + - Return [ int ] + } + + Method [ public method offsetSet ] { + + - Parameters [2] { + Parameter #0 [ $index ] + Parameter #1 [ $values ] + } + - Return [ void ] + } + + Method [ public method offsetExists ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ bool ] + } + + Method [ public method offsetUnset ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ void ] + } + + Method [ public method offsetGet ] { + + - Parameters [1] { + Parameter #0 [ $index ] + } + - Return [ array ] + } + + Method [ public method getIterator ] { + } + + Method [ public method __toString ] { + + - Parameters [0] { + } + - Return [ string ] + } + } + } + + Class [ class Tensor\Reductions\Ref ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [3] { + Method [ static public method reduce ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Reductions\Ref ] + } + + Method [ static public method gaussianElimination ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Reductions\Ref ] + } + + Method [ static public method rowReductionMethod ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Reductions\Ref ] + } + } + + - Properties [2] { + Property [ protected $a ] + Property [ protected $swaps ] + } + + - Methods [3] { + Method [ public method __construct ] { + + - Parameters [2] { + Parameter #0 [ Tensor\Matrix $a ] + Parameter #1 [ int $swaps ] + } + } + + Method [ public method a ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + + Method [ public method swaps ] { + + - Parameters [0] { + } + - Return [ int ] + } + } + } + + Class [ class Tensor\Reductions\Rref ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [1] { + Method [ static public method reduce ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + - Return [ Tensor\Reductions\Rref ] + } + } + + - Properties [1] { + Property [ protected $a ] + } + + - Methods [2] { + Method [ public method __construct ] { + + - Parameters [1] { + Parameter #0 [ Tensor\Matrix $a ] + } + } + + Method [ public method a ] { + + - Parameters [0] { + } + - Return [ Tensor\Matrix ] + } + } + } + + Class [ class Tensor\Settings ] { + + - Constants [0] { + } + + - Static properties [0] { + } + + - Static methods [2] { + Method [ static public method setNumThreads ] { + + - Parameters [1] { + Parameter #0 [ int $threads ] + } + - Return [ void ] + } + + Method [ static public method numThreads ] { + + - Parameters [0] { + } + - Return [ int ] + } + } + + - Properties [0] { + } + + - Methods [0] { + } + } + } +} + diff --git a/php-pecl-tensor.spec b/php-pecl-tensor.spec new file mode 100644 index 0000000..e1740dd --- /dev/null +++ b/php-pecl-tensor.spec @@ -0,0 +1,211 @@ +# remirepo spec file for php-pecl-tensor +# +# Copyright (c) 2020-2021 Remi Collet +# License: CC-BY-SA +# http://creativecommons.org/licenses/by-sa/4.0/ +# +# Please, preserve the changelog entries +# +%if 0%{?scl:1} +%global sub_prefix %{scl_prefix} +%scl_package php-pecl-tensor +%endif + +%global pecl_name tensor +%global with_zts 0%{!?_without_zts:%{?__ztsphp:1}} +# After 20-json +%global ini_name 40-%{pecl_name}.ini + +%global upstream_version 2.1.03 +#global upstream_prever alpha2 + +Summary: Objects for scientific computing in PHP +Name: %{?sub_prefix}php-pecl-%{pecl_name} +Version: %{upstream_version}%{?upstream_prever:~%{upstream_prever}} +Release: 1%{?dist}%{!?scl:%{!?nophptag:%(%{__php} -r 'echo ".".PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')}} +License: BSD +URL: https://pecl.php.net/package/%{pecl_name} +Source0: https://pecl.php.net/get/%{pecl_name}-%{upstream_version}%{?upstream_prever}.tgz + +Patch0: tensor-headers.patch +Patch1: tensor-libs.patch + +BuildRequires: make +BuildRequires: %{?dtsprefix}gcc +BuildRequires: %{?scl_prefix}php-devel >= 7.2 +BuildRequires: %{?scl_prefix}php-pear +BuildRequires: %{?scl_prefix}php-json +BuildRequires: openblas-devel + +Requires: %{?scl_prefix}php(zend-abi) = %{php_zend_api} +Requires: %{?scl_prefix}php(api) = %{php_core_api} +Requires: %{?scl_prefix}php-json%{?_isa} +Requires: %{?scl_prefix}php-pdo%{?_isa} +%{?_sclreq:Requires: %{?scl_prefix}runtime%{?_sclreq}%{?_isa}} + +Provides: %{?scl_prefix}php-%{pecl_name} = %{version} +Provides: %{?scl_prefix}php-%{pecl_name}%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name}) = %{version} +Provides: %{?scl_prefix}php-pecl(%{pecl_name})%{?_isa} = %{version} +Provides: %{?scl_prefix}php-pecl-%{pecl_name} = %{version}-%{release} +Provides: %{?scl_prefix}php-pecl-%{pecl_name}%{?_isa} = %{version}-%{release} + +%if "%{?packager}" == "Remi Collet" && 0%{!?scl:1} && 0%{?rhel} +# Other third party repo stuff +%if "%{php_version}" > "8.0" +Obsoletes: php73-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php74-pecl-%{pecl_name} <= %{version} +%endif +%if "%{php_version}" > "8.0" +Obsoletes: php80-pecl-%{pecl_name} <= %{version} +%endif +%endif + + +%description +Tensor is a library and extension that provides objects for scientific +computing in PHP. + +Package built for PHP %(%{__php} -r 'echo PHP_MAJOR_VERSION.".".PHP_MINOR_VERSION;')%{?scl: as Software Collection (%{scl} by %{?scl_vendor}%{!?scl_vendor:rh})}. + + +%prep +%setup -q -c + +# Don't install/register tests +sed -e 's/role="test"/role="src"/' \ + %{?_licensedir:-e '/LICENSE/s/role="doc"/role="src"/' } \ + -i package.xml + +mv %{pecl_name}-%{upstream_version}%{?upstream_prever} NTS + +cd NTS +%patch0 -p1 -b .headers +%patch1 -p1 -b .libs + +# Sanity check, really often broken +extver=$(sed -n '/#define PHP_TENSOR_VERSION/{s/.* "//;s/".*$//;p}' ext/php_tensor.h) +if test "x${extver}" != "x%{upstream_version}%{?upstream_prever}"; then + : Error: Upstream extension version is ${extver}, expecting %{upstream_version}%{?upstream_prever}. + #exit 1 +fi +cd .. + +%if %{with_zts} +# Duplicate source tree for NTS / ZTS build +cp -pr NTS ZTS +%endif + +# Create configuration file +cat > %{ini_name} << 'EOF' +; Enable %{pecl_name} extension module +extension=%{pecl_name}.so +EOF + + +%build +%{?dtsenable} + +cd NTS/ext +%{_bindir}/phpize +%configure \ + --enable-tensor \ + --with-libdir=%{_lib} \ + --with-php-config=%{_bindir}/php-config + +make %{?_smp_mflags} + +%if %{with_zts} +cd ../../ZTS/ext +%{_bindir}/zts-phpize +%configure \ + --enable-tensor \ + --with-libdir=%{_lib} \ + --with-php-config=%{_bindir}/zts-php-config + +make %{?_smp_mflags} +%endif + + +%install +%{?dtsenable} + +make -C NTS/ext install INSTALL_ROOT=%{buildroot} + +# install config file +install -D -m 644 %{ini_name} %{buildroot}%{php_inidir}/%{ini_name} + +# Install XML package description +install -D -m 644 package.xml %{buildroot}%{pecl_xmldir}/%{name}.xml + +%if %{with_zts} +make -C ZTS/ext install INSTALL_ROOT=%{buildroot} +install -D -m 644 %{ini_name} %{buildroot}%{php_ztsinidir}/%{ini_name} +%endif + +# Documentation +cd NTS +for i in $(grep 'role="doc"' ../package.xml | sed -e 's/^.*name="//;s/".*$//') +do install -Dpm 644 $i %{buildroot}%{pecl_docdir}/%{pecl_name}/$i +done + + +%if 0%{?fedora} < 24 && 0%{?rhel} < 8 +# when pear installed alone, after us +%triggerin -- %{?scl_prefix}php-pear +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +# posttrans as pear can be installed after us +%posttrans +if [ -x %{__pecl} ] ; then + %{pecl_install} %{pecl_xmldir}/%{name}.xml >/dev/null || : +fi + +%postun +if [ $1 -eq 0 -a -x %{__pecl} ] ; then + %{pecl_uninstall} %{pecl_name} >/dev/null || : +fi +%endif + + +%check +: Minimal load test for NTS extension +%{_bindir}/php --no-php-ini \ + --define extension=json.so \ + --define extension=%{buildroot}%{php_extdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' + +%if %{with_zts} +: Minimal load test for ZTS extension +%{__ztsphp} --no-php-ini \ + --define extension=json.so \ + --define extension=%{buildroot}%{php_ztsextdir}/%{pecl_name}.so \ + --modules | grep '^%{pecl_name}$' +%endif + + +%files +%{?_licensedir:%license NTS/LICENSE} +%doc %{pecl_docdir}/%{pecl_name} +%{pecl_xmldir}/%{name}.xml + +%config(noreplace) %{php_inidir}/%{ini_name} +%{php_extdir}/%{pecl_name}.so + +%if %{with_zts} +%config(noreplace) %{php_ztsinidir}/%{ini_name} +%{php_ztsextdir}/%{pecl_name}.so +%endif + + +%changelog +* Mon Feb 15 2021 Remi Collet - 1.8.0~alpha2-1 +- initial package +- open https://github.com/RubixML/Tensor/pull/11 + check for openblas headers +- open https://github.com/RubixML/Tensor/issues/12 + PHP 8 compatibility diff --git a/tensor-headers.patch b/tensor-headers.patch new file mode 100644 index 0000000..e2fed73 --- /dev/null +++ b/tensor-headers.patch @@ -0,0 +1,39 @@ +From 9feb1e81f79e28b78b803abde4dacaca820dafe8 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Mon, 15 Feb 2021 09:37:22 +0100 +Subject: [PATCH] check for openblas headers + +--- + ext/config.m4 | 18 +++++++++++++++++- + 1 file changed, 17 insertions(+), 1 deletion(-) + +diff --git a/ext/config.m4 b/ext/config.m4 +index ae03d9c..2b130c0 100644 +--- a/ext/config.m4 ++++ b/ext/config.m4 +@@ -1,8 +1,24 @@ + PHP_ARG_ENABLE(tensor, whether to enable tensor, [ --enable-tensor Enable Tensor]) + ++PHP_ARG_WITH(openblas, libopenblas directory, ++[ --with-openblas=DIR libopenblas directory], no, no) ++ + if test "$PHP_TENSOR" = "yes"; then + +- ++ AC_MSG_CHECKING([Check openblas headers]) ++ for i in $PHP_OPENBLAS /usr/local/include /usr/include/openblas /usr/include; do ++ if test -r $i/cblas.h; then ++ OPENBLAS_DIR=$i ++ AC_MSG_RESULT([found in $i]) ++ break ++ fi ++ done ++ ++ if test -z "$OPENBLAS_DIR"; then ++ AC_MSG_ERROR([openblas headers not found]) ++ else ++ PHP_ADD_INCLUDE($OPENBLAS_DIR) ++ fi + + if ! test "x-lopenblas -llapacke -lgfortran -lpthread" = "x"; then + PHP_EVAL_LIBLINE(-lopenblas -llapacke -lgfortran -lpthread, TENSOR_SHARED_LIBADD) diff --git a/tensor-libs.patch b/tensor-libs.patch new file mode 100644 index 0000000..42fe7b3 --- /dev/null +++ b/tensor-libs.patch @@ -0,0 +1,15 @@ +diff --git a/ext/config.m4 b/ext/config.m4 +index 2b130c0..90b7e1c 100644 +--- a/ext/config.m4 ++++ b/ext/config.m4 +@@ -20,9 +20,7 @@ if test "$PHP_TENSOR" = "yes"; then + PHP_ADD_INCLUDE($OPENBLAS_DIR) + fi + +- if ! test "x-lopenblas -llapacke -lgfortran -lpthread" = "x"; then +- PHP_EVAL_LIBLINE(-lopenblas -llapacke -lgfortran -lpthread, TENSOR_SHARED_LIBADD) +- fi ++ PHP_EVAL_LIBLINE(-lopenblas, TENSOR_SHARED_LIBADD) + + AC_DEFINE(HAVE_TENSOR, 1, [Whether you have Tensor]) + tensor_sources="tensor.c kernel/main.c kernel/memory.c kernel/exception.c kernel/debug.c kernel/backtrace.c kernel/object.c kernel/array.c kernel/string.c kernel/fcall.c kernel/require.c kernel/file.c kernel/operators.c kernel/math.c kernel/concat.c kernel/variables.c kernel/filter.c kernel/iterator.c kernel/time.c kernel/exit.c tensor/arithmetic.zep.c -- cgit