47 lines
874 B
PHP
47 lines
874 B
PHP
<?php
|
|
|
|
namespace Arma;
|
|
|
|
/**
|
|
* Interface for a dense matrix.
|
|
*
|
|
* @package Arma
|
|
*/
|
|
interface Mat
|
|
{
|
|
/**
|
|
* Construct the matrix to have user specified dimensions and fill with specified pattern.
|
|
*
|
|
* @param int $in_rows
|
|
* @param int $in_cols
|
|
* @param int $fill[optional]
|
|
* @return Mat
|
|
*/
|
|
static function init($in_rows, $in_cols, $fill);
|
|
|
|
/**
|
|
* Create the matrix from a textual description.
|
|
*
|
|
* @param string $text
|
|
* @return Mat
|
|
*/
|
|
static function fromString($text);
|
|
|
|
/**
|
|
* Create the matrix from a column or row vector.
|
|
*
|
|
* @param Colvec|Rowvec $vector
|
|
* @return Mat
|
|
*/
|
|
static function fromVec($vector);
|
|
|
|
/**
|
|
* Create the matrix from a sparse matrix.
|
|
*
|
|
* @param SpMat $sp_mat
|
|
* @return Mat
|
|
*/
|
|
static function fromSparse($sp_mat);
|
|
|
|
}
|