This repository has been archived on 2020-06-07. You can view files and clone it, but cannot push or open issues or pull requests.
php-armadillo/stubs/Mat.php
2019-03-08 22:15:02 +08:00

146 lines
2.8 KiB
PHP

<?php
namespace Arma;
/**
* Interface for a dense matrix.
*
* @package Arma
*/
interface Mat extends Internal\Dense, Internal\Matrix
{
/**
* Construct the matrix to have user specified dimensions and fill with specified pattern.
*
* @param int $n_rows
* @param int $n_cols
* @param int $fill[optional]
* @return static
*/
static function init($n_rows, $n_cols, $fill);
/**
* Create the matrix from a textual description.
*
* @param string $text
* @return static
*/
static function fromString($text);
/**
* Set all the elements of an object to one, optionally first changing the size to specified dimensions.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
* @return void
*/
function ones($n_rows, $n_cols);
/**
* 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_rows
* @param int $n_cols
* @return void
*/
function randu($n_rows, $n_cols);
/**
* 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_rows
* @param int $n_cols
* @return void
*/
function randn($n_rows, $n_cols);
/**
* @inheritdoc
*
* @param int $col_number
* @return SvCol
*/
function col($col_number);
/**
* @inheritdoc
*
* @param int $row_number
* @return SvRow
*/
function row($row_number);
/**
* @inheritdoc
*
* @param int $first_col
* @param int $last_col
* @return SvMat
*/
function cols($first_col, $last_col);
/**
* @inheritdoc
*
* @param int $first_row
* @param int $last_row
* @return SvMat
*/
function rows($first_row, $last_row);
/**
* @inheritdoc
*
* @param int $first_row
* @param int $first_col
* @param int $last_row
* @param int $last_col
* @return SvMat
*/
function submat($first_row, $first_col, $last_row, $last_col);
/**
* @inheritdoc
*
* @param $n_cols
* @return SvMat
*/
function head_cols($n_cols);
/**
* @inheritdoc
*
* @param int $n_rows
* @return SvMat
*/
function head_rows($n_rows);
/**
* @inheritdoc
*
* @param int $n_cols
* @return SvMat
*/
function tail_cols($n_cols);
/**
* @inheritdoc
*
* @param int $n_rows
* @return SvMat
*/
function tail_rows($n_rows);
/**
* @inheritdoc
*
* @param int $k
* @return DiagView
*/
function diag($k = 0);
}