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.
2018-11-09 13:56:34 +00:00
|
|
|
<?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);
|
|
|
|
|
2019-02-05 13:31:16 +00:00
|
|
|
}
|