update stubs
This commit is contained in:
parent
2c16d01842
commit
a861bf46d2
|
@ -6,3 +6,5 @@ interface Colvec extends Internal\Operable
|
|||
{
|
||||
|
||||
}
|
||||
|
||||
class_alias(Colvec::class, 'Arma\\Vec');
|
||||
|
|
|
@ -14,7 +14,7 @@ interface CxMat extends Mat
|
|||
*
|
||||
* @param Mat $real
|
||||
* @param Mat $imag
|
||||
* @return CxMat
|
||||
* @return static
|
||||
*/
|
||||
static function fromMats($real, $imag);
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ interface Mat extends Internal\Operable
|
|||
* @param int $in_rows
|
||||
* @param int $in_cols
|
||||
* @param int $fill[optional]
|
||||
* @return Mat
|
||||
* @return static
|
||||
*/
|
||||
static function init($in_rows, $in_cols, $fill);
|
||||
|
||||
|
@ -23,7 +23,7 @@ interface Mat extends Internal\Operable
|
|||
* Create the matrix from a textual description.
|
||||
*
|
||||
* @param string $text
|
||||
* @return Mat
|
||||
* @return static
|
||||
*/
|
||||
static function fromString($text);
|
||||
|
||||
|
@ -31,7 +31,7 @@ interface Mat extends Internal\Operable
|
|||
* Create the matrix from a column or row vector.
|
||||
*
|
||||
* @param Colvec|Rowvec $vector
|
||||
* @return Mat
|
||||
* @return static
|
||||
*/
|
||||
static function fromVec($vector);
|
||||
|
||||
|
@ -39,7 +39,7 @@ interface Mat extends Internal\Operable
|
|||
* Create the matrix from a sparse matrix.
|
||||
*
|
||||
* @param SpMat $sp_mat
|
||||
* @return Mat
|
||||
* @return static
|
||||
*/
|
||||
static function fromSparse($sp_mat);
|
||||
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
|
||||
namespace Arma;
|
||||
|
||||
interface SpMat
|
||||
interface SpMat extends Internal\Accessible
|
||||
{
|
||||
|
||||
}
|
||||
|
|
|
@ -1,5 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace arma;
|
||||
|
||||
class_alias(Colvec::class, 'arma\\Vec');
|
|
@ -4,33 +4,5 @@ namespace Arma;
|
|||
|
||||
class CxDMat implements CxMat
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxDMat
|
||||
*/
|
||||
static function init($in_rows, $in_cols, $fill = null) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxDMat
|
||||
*/
|
||||
public static function fromMats($real, $imag) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxDMat
|
||||
*/
|
||||
static function fromSparse($sp_mat) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxDMat
|
||||
*/
|
||||
static function fromString($text) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxDMat
|
||||
*/
|
||||
static function fromVec($vector) {}
|
||||
}
|
||||
|
|
|
@ -4,33 +4,5 @@ namespace Arma;
|
|||
|
||||
class CxIMat implements CxMat
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxIMat
|
||||
*/
|
||||
static function init($in_rows, $in_cols, $fill = 0) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxIMat
|
||||
*/
|
||||
public static function fromMats($real, $imag) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxIMat
|
||||
*/
|
||||
static function fromSparse($sp_mat) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxIMat
|
||||
*/
|
||||
static function fromString($text) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return CxIMat
|
||||
*/
|
||||
static function fromVec($vector) {}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,10 @@
|
|||
<?php
|
||||
|
||||
namespace Arma;
|
||||
|
||||
class DColvec implements Colvec
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
class_alias(DColvec::class, 'Arma\\DVec');
|
|
@ -4,27 +4,5 @@ namespace Arma;
|
|||
|
||||
class DMat implements Mat
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return DMat
|
||||
*/
|
||||
static function init($in_rows, $in_cols, $fill = null) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return DMat
|
||||
*/
|
||||
static function fromSparse($sp_mat) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return DMat
|
||||
*/
|
||||
static function fromString($text) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return DMat
|
||||
*/
|
||||
static function fromVec($vector) {}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,8 @@
|
|||
<?php
|
||||
|
||||
namespace Arma;
|
||||
|
||||
class DRowvec implements Rowvec
|
||||
{
|
||||
|
||||
}
|
|
@ -4,27 +4,5 @@ namespace Arma;
|
|||
|
||||
class IMat implements Mat
|
||||
{
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return IMat
|
||||
*/
|
||||
static function init($in_rows, $in_cols, $fill = 0) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return IMat
|
||||
*/
|
||||
static function fromSparse($sp_mat) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return IMat
|
||||
*/
|
||||
static function fromString($text) {}
|
||||
|
||||
/**
|
||||
* @inheritdoc
|
||||
* @return IMat
|
||||
*/
|
||||
static function fromVec($vector) {}
|
||||
}
|
||||
|
|
|
@ -4,9 +4,46 @@ namespace Arma\Internal;
|
|||
|
||||
interface Accessible
|
||||
{
|
||||
/**
|
||||
* Get number of rows.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function nRows();
|
||||
|
||||
/**
|
||||
* Get number of columns.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function nCols();
|
||||
|
||||
/**
|
||||
* Get number of elements.
|
||||
*
|
||||
* @return int
|
||||
*/
|
||||
function nElem();
|
||||
|
||||
/**
|
||||
* If $j is not specified, access the n-th element. Otherwise, access the element stored at the i-th row
|
||||
* and j-th column.
|
||||
*
|
||||
* @param int $i
|
||||
* @param int $j[optional]
|
||||
* @return mixed
|
||||
*/
|
||||
function &__invoke($i, $j);
|
||||
|
||||
/**
|
||||
* If $j is not specified, access the n-th element. Otherwise, access the element stored at the i-th row
|
||||
* and j-th column.
|
||||
*
|
||||
* Without a bounds check. Not recommended for use unless your code has been thoroughly debugged.
|
||||
*
|
||||
* @param int $i
|
||||
* @param int $j[optional]
|
||||
* @return mixed
|
||||
*/
|
||||
function &at($i, $j);
|
||||
}
|
||||
|
|
|
@ -4,23 +4,99 @@ namespace Arma\Internal;
|
|||
|
||||
interface Operable extends Accessible
|
||||
{
|
||||
/**
|
||||
* Addition of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return static
|
||||
*/
|
||||
function add($other);
|
||||
|
||||
/**
|
||||
* Subtraction of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return static
|
||||
*/
|
||||
function sub($other);
|
||||
|
||||
/**
|
||||
* Negation of the object.
|
||||
*
|
||||
* @return static
|
||||
*/
|
||||
function neg();
|
||||
|
||||
/**
|
||||
* Matrix multiplication of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return static
|
||||
*/
|
||||
function mul($other);
|
||||
|
||||
/**
|
||||
* Element-wise multiplication of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return static
|
||||
*/
|
||||
function dotMul($other);
|
||||
|
||||
/**
|
||||
* Element-wise division of an object by another object or a scalar.
|
||||
*
|
||||
* @param static|number $other
|
||||
* @return static
|
||||
*/
|
||||
function div($other);
|
||||
|
||||
function equals($others);
|
||||
/**
|
||||
* Element-wise equality evaluation of two objects.
|
||||
*
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function equals($other);
|
||||
|
||||
/**
|
||||
* Element-wise non-equality evaluation of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function notEquals($other);
|
||||
|
||||
/**
|
||||
* Element-wise "greater than" evaluation of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function greaterThan($other);
|
||||
|
||||
/**
|
||||
* Element-wise "smaller than" evaluation of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function smallerThan($other);
|
||||
|
||||
/**
|
||||
* Element-wise "not greater than" evaluation of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function notGreaterThan($other);
|
||||
|
||||
/**
|
||||
* Element-wise "not smaller than" evaluation of two objects.
|
||||
*
|
||||
* @param static $other
|
||||
* @return \Arma\IMat
|
||||
*/
|
||||
function notSmallerThan($other);
|
||||
}
|
||||
|
|
Reference in New Issue
Block a user