update stubs
This commit is contained in:
parent
f2c4d721f5
commit
fe14e900a2
|
@ -7,7 +7,7 @@ namespace Arma;
|
||||||
*
|
*
|
||||||
* @package Arma
|
* @package Arma
|
||||||
*/
|
*/
|
||||||
interface Col extends Internal\Dense, Internal\Vector
|
interface Col extends Internal\DenseVector
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,8 +12,8 @@ interface Mat extends Internal\Dense, Internal\Matrix
|
||||||
/**
|
/**
|
||||||
* Construct the matrix to have user specified dimensions and fill with specified pattern.
|
* Construct the matrix to have user specified dimensions and fill with specified pattern.
|
||||||
*
|
*
|
||||||
* @param int $n_rows
|
* @param int $n_rows[optional]
|
||||||
* @param int $n_cols
|
* @param int $n_cols[optional]
|
||||||
* @param int $fill[optional]
|
* @param int $fill[optional]
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -7,7 +7,7 @@ namespace Arma;
|
||||||
*
|
*
|
||||||
* @package Arma
|
* @package Arma
|
||||||
*/
|
*/
|
||||||
interface Row extends Internal\Dense, Internal\Vector
|
interface Row extends Internal\DenseVector
|
||||||
{
|
{
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
8
stubs/SpCol.php
Normal file
8
stubs/SpCol.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
interface SpCol extends Internal\Sparse, Internal\Vector, Internal\ResizableVector
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/SpRow.php
Normal file
8
stubs/SpRow.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
interface SpRow extends Internal\Sparse, Internal\Vector, Internal\ResizableVector
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpCxDCol.php
Normal file
8
stubs/impl/SpCxDCol.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpCxDCol implements SpCol
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpCxDRow.php
Normal file
8
stubs/impl/SpCxDRow.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpCxDRow implements SpRow
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpDCol.php
Normal file
8
stubs/impl/SpDCol.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpDCol implements SpCol
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpDRow.php
Normal file
8
stubs/impl/SpDRow.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpDRow implements SpRow
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpICol.php
Normal file
8
stubs/impl/SpICol.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpICol implements SpCol
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
8
stubs/impl/SpIRow.php
Normal file
8
stubs/impl/SpIRow.php
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma;
|
||||||
|
|
||||||
|
class SpIRow implements SpRow
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
36
stubs/internal/DenseVector.php
Normal file
36
stubs/internal/DenseVector.php
Normal file
|
@ -0,0 +1,36 @@
|
||||||
|
<?php
|
||||||
|
|
||||||
|
namespace Arma\Internal;
|
||||||
|
|
||||||
|
interface DenseVector extends Dense, Vector
|
||||||
|
{
|
||||||
|
// Initialization
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set all the elements of an object to one, optionally first changing the size to specified dimensions.
|
||||||
|
*
|
||||||
|
* @param int $n_elem[optional]
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function ones($n_elem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set all the elements to random values, optionally first changing the size to specified dimensions.
|
||||||
|
*
|
||||||
|
* Uses a uniform distribution in the [0,1] interval.
|
||||||
|
*
|
||||||
|
* @param int $n_elem[optional]
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function randu($n_elem);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Set all the elements to random values, optionally first changing the size to specified dimensions.
|
||||||
|
*
|
||||||
|
* Uses a normal/Gaussian distribution with zero mean and unit variance.
|
||||||
|
*
|
||||||
|
* @param int $n_elem[optional]
|
||||||
|
* @return void
|
||||||
|
*/
|
||||||
|
function randn($n_elem);
|
||||||
|
}
|
|
@ -12,8 +12,8 @@ interface Matrix
|
||||||
/**
|
/**
|
||||||
* Set the elements of an object to zero, optionally first changing the size to specified dimensions.
|
* Set the elements of an object to zero, 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 zeros($n_rows, $n_cols);
|
function zeros($n_rows, $n_cols);
|
||||||
|
@ -22,8 +22,8 @@ interface Matrix
|
||||||
* Set the elements along the main diagonal to one and off-diagonal elements to zero, optionally
|
* Set the elements along the main diagonal to one and off-diagonal elements to zero, optionally
|
||||||
* first changing the size to specified dimensions.
|
* 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 eye($n_rows, $n_cols);
|
function eye($n_rows, $n_cols);
|
||||||
|
|
|
@ -3,16 +3,18 @@
|
||||||
namespace Arma\Internal;
|
namespace Arma\Internal;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Interface for vectors (Col and Row).
|
* Interface for vectors (Col, Row, SpCol and SpRow).
|
||||||
*
|
*
|
||||||
* @package Arma\Internal
|
* @package Arma\Internal
|
||||||
*/
|
*/
|
||||||
interface Vector
|
interface Vector
|
||||||
{
|
{
|
||||||
|
// Constructors
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Construct the vector to have user specified size and fill with specified pattern.
|
* Construct the vector to have user specified size and fill with specified pattern.
|
||||||
*
|
*
|
||||||
* @param int $n_elem
|
* @param int $n_elem[optional]
|
||||||
* @param int $fill[optional]
|
* @param int $fill[optional]
|
||||||
* @return static
|
* @return static
|
||||||
*/
|
*/
|
||||||
|
@ -28,42 +30,16 @@ interface Vector
|
||||||
*/
|
*/
|
||||||
static function fromString($text);
|
static function fromString($text);
|
||||||
|
|
||||||
|
// Initialization
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Set the elements of an object to zero, optionally first changing the size to specified dimensions.
|
* Set the elements of an object to zero, optionally first changing the size to specified dimensions.
|
||||||
*
|
*
|
||||||
* @param $n_elem[optional]
|
* @param int $n_elem[optional]
|
||||||
* @return void
|
* @return void
|
||||||
*/
|
*/
|
||||||
function zeros($n_elem);
|
function zeros($n_elem);
|
||||||
|
|
||||||
/**
|
|
||||||
* Set all the elements of an object to one, optionally first changing the size to specified dimensions.
|
|
||||||
*
|
|
||||||
* @param $n_elem[optional]
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function ones($n_elem);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set all the elements to random values, optionally first changing the size to specified dimensions.
|
|
||||||
*
|
|
||||||
* Uses a uniform distribution in the [0,1] interval.
|
|
||||||
*
|
|
||||||
* @param $n_elem[optional]
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function randu($n_elem);
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Set all the elements to random values, optionally first changing the size to specified dimensions.
|
|
||||||
*
|
|
||||||
* Uses a normal/Gaussian distribution with zero mean and unit variance.
|
|
||||||
*
|
|
||||||
* @param $n_elem[optional]
|
|
||||||
* @return void
|
|
||||||
*/
|
|
||||||
function randn($n_elem);
|
|
||||||
|
|
||||||
// Vector subview
|
// Vector subview
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
Reference in New Issue
Block a user