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

68 lines
1.5 KiB
PHP
Raw Normal View History

2018-11-09 13:56:34 +00:00
<?php
namespace Arma;
/**
* Interface for a dense matrix.
*
* @package Arma
*/
2019-02-21 10:49:25 +00:00
interface Mat extends Internal\Accessible, Internal\Operable, Internal\MatBase
2018-11-09 13:56:34 +00:00
{
/**
* Construct the matrix to have user specified dimensions and fill with specified pattern.
*
2019-02-22 01:54:21 +00:00
* @param int $n_rows
* @param int $n_cols
2018-11-09 13:56:34 +00:00
* @param int $fill[optional]
2019-02-14 11:11:36 +00:00
* @return static
2018-11-09 13:56:34 +00:00
*/
2019-02-22 01:54:21 +00:00
static function init($n_rows, $n_cols, $fill);
2018-11-09 13:56:34 +00:00
/**
* Create the matrix from a textual description.
*
* @param string $text
2019-02-14 11:11:36 +00:00
* @return static
2018-11-09 13:56:34 +00:00
*/
static function fromString($text);
/**
* Create the matrix from a column or row vector.
*
* @param Colvec|Rowvec $vector
2019-02-14 11:11:36 +00:00
* @return static
2018-11-09 13:56:34 +00:00
*/
static function fromVec($vector);
/**
* Create the matrix from a sparse matrix.
*
* @param SpMat $sp_mat
2019-02-14 11:11:36 +00:00
* @return static
2018-11-09 13:56:34 +00:00
*/
static function fromSparse($sp_mat);
2019-02-22 01:54:21 +00:00
/**
* 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);
2019-02-05 13:31:16 +00:00
}