update stubs

This commit is contained in:
CismonX 2019-03-13 23:19:05 +08:00
parent fe14e900a2
commit ad02ff97f2
12 changed files with 75 additions and 30 deletions

View File

@ -30,8 +30,8 @@ interface Mat extends Internal\Dense, Internal\Matrix
/** /**
* Set all the elements of an object to one, optionally first changing the size to specified dimensions. * Set all the elements of an object to one, optionally first changing the size to specified dimensions.
* *
* @param $n_rows[optional] * @param int $n_rows[optional]
* @param $n_cols[optional] * @param int $n_cols[optional]
* @return void * @return void
*/ */
function ones($n_rows, $n_cols); function ones($n_rows, $n_cols);
@ -59,7 +59,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function randn($n_rows, $n_cols); function randn($n_rows, $n_cols);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $col_number * @param int $col_number
* @return SvCol * @return SvCol
@ -67,7 +67,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function col($col_number); function col($col_number);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $row_number * @param int $row_number
* @return SvRow * @return SvRow
@ -75,7 +75,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function row($row_number); function row($row_number);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_col * @param int $first_col
* @param int $last_col * @param int $last_col
@ -84,7 +84,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function cols($first_col, $last_col); function cols($first_col, $last_col);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_row * @param int $first_row
* @param int $last_row * @param int $last_row
@ -93,7 +93,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function rows($first_row, $last_row); function rows($first_row, $last_row);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_row * @param int $first_row
* @param int $first_col * @param int $first_col
@ -104,15 +104,15 @@ interface Mat extends Internal\Dense, Internal\Matrix
function submat($first_row, $first_col, $last_row, $last_col); function submat($first_row, $first_col, $last_row, $last_col);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param $n_cols * @param int $n_cols
* @return SvMat * @return SvMat
*/ */
function head_cols($n_cols); function head_cols($n_cols);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_rows * @param int $n_rows
* @return SvMat * @return SvMat
@ -120,7 +120,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function head_rows($n_rows); function head_rows($n_rows);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_cols * @param int $n_cols
* @return SvMat * @return SvMat
@ -128,7 +128,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function tail_cols($n_cols); function tail_cols($n_cols);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_rows * @param int $n_rows
* @return SvMat * @return SvMat
@ -136,7 +136,7 @@ interface Mat extends Internal\Dense, Internal\Matrix
function tail_rows($n_rows); function tail_rows($n_rows);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $k * @param int $k
* @return DiagView * @return DiagView

View File

@ -10,7 +10,7 @@ namespace Arma;
interface SpMat extends Internal\Sparse, Internal\Matrix interface SpMat extends Internal\Sparse, Internal\Matrix
{ {
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $col_number * @param int $col_number
* @return SpSvMat * @return SpSvMat
@ -18,7 +18,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function col($col_number); function col($col_number);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $row_number * @param int $row_number
* @return SpSvMat * @return SpSvMat
@ -26,7 +26,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function row($row_number); function row($row_number);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_col * @param int $first_col
* @param int $last_col * @param int $last_col
@ -35,7 +35,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function cols($first_col, $last_col); function cols($first_col, $last_col);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_row * @param int $first_row
* @param int $last_row * @param int $last_row
@ -44,7 +44,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function rows($first_row, $last_row); function rows($first_row, $last_row);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $first_row * @param int $first_row
* @param int $first_col * @param int $first_col
@ -55,15 +55,15 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function submat($first_row, $first_col, $last_row, $last_col); function submat($first_row, $first_col, $last_row, $last_col);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param $n_cols * @param int $n_cols
* @return SpSvMat * @return SpSvMat
*/ */
function head_cols($n_cols); function head_cols($n_cols);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_rows * @param int $n_rows
* @return SpSvMat * @return SpSvMat
@ -71,7 +71,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function head_rows($n_rows); function head_rows($n_rows);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_cols * @param int $n_cols
* @return SpSvMat * @return SpSvMat
@ -79,7 +79,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function tail_cols($n_cols); function tail_cols($n_cols);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $n_rows * @param int $n_rows
* @return SpSvMat * @return SpSvMat
@ -87,7 +87,7 @@ interface SpMat extends Internal\Sparse, Internal\Matrix
function tail_rows($n_rows); function tail_rows($n_rows);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $k * @param int $k
* @return SpDiagView * @return SpDiagView

View File

@ -9,5 +9,21 @@ namespace Arma;
*/ */
class CxDouble extends Complex class CxDouble extends Complex
{ {
/**
* @var double
*/
public $real;
/**
* @var double
*/
public $imag;
/**
* {@inheritdoc}
*
* @param double $real[optional]
* @param double $imag[optional]
*/
function __construct($real, $imag) {}
} }

View File

@ -10,7 +10,7 @@ namespace Arma\Internal;
interface Dense extends Common interface Dense extends Common
{ {
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $i * @param int $i
* @param int $j[optional] * @param int $j[optional]
@ -19,7 +19,7 @@ interface Dense extends Common
function at($i, $j); function at($i, $j);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $i * @param int $i
* @param int $j[optional] * @param int $j[optional]

View File

@ -2,6 +2,10 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface for vectors with a Dense Layout (Row and Col)
* @package Arma\Internal
*/
interface DenseVector extends Dense, Vector interface DenseVector extends Dense, Vector
{ {
// Initialization // Initialization

View File

@ -7,7 +7,7 @@ namespace Arma\Internal;
* *
* @package Arma\Internal * @package Arma\Internal
*/ */
interface Diagonal extends Common interface Diagonal extends Common, Subview
{ {
/** /**
* Sets the elements to a specified value. The type of value must match the type of elements used by * Sets the elements to a specified value. The type of value must match the type of elements used by

View File

@ -122,7 +122,7 @@ interface Matrix
/** /**
* Read/write access to a matrix subview of first specified columns. * Read/write access to a matrix subview of first specified columns.
* *
* @param $n_cols * @param int $n_cols
* @return Subview * @return Subview
*/ */
function head_cols($n_cols); function head_cols($n_cols);

View File

@ -2,6 +2,11 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface for resizable objects (non-subview objects)
*
* @package Arma\Internal
*/
interface Resizable interface Resizable
{ {
/** /**

View File

@ -2,6 +2,11 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface for resizable matrices.
*
* @package Arma\Internal
*/
interface ResizableMatrix extends Resizable interface ResizableMatrix extends Resizable
{ {
/** /**

View File

@ -2,6 +2,11 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface for resizable vectors.
*
* @package Arma\Internal
*/
interface ResizableVector extends Resizable interface ResizableVector extends Resizable
{ {
/** /**

View File

@ -2,10 +2,15 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface for objects whose elements are stored in CSC format (SpMat, SpCol and SpRow).
*
* @package Arma\Internal
*/
interface Sparse extends Common interface Sparse extends Common
{ {
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $i * @param int $i
* @param int $j[optional] * @param int $j[optional]
@ -14,7 +19,7 @@ interface Sparse extends Common
function at($i, $j); function at($i, $j);
/** /**
* @inheritdoc * {@inheritdoc}
* *
* @param int $i * @param int $i
* @param int $j[optional] * @param int $j[optional]

View File

@ -2,6 +2,11 @@
namespace Arma\Internal; namespace Arma\Internal;
/**
* Interface of object subview (Mat, Col, Row, SpMat).
*
* @package Arma\Internal
*/
interface Subview interface Subview
{ {