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/internal/DenseMatrix.php

129 lines
2.3 KiB
PHP
Raw Normal View History

2019-03-18 14:49:42 +00:00
<?php
namespace Arma\Internal;
2019-04-04 08:07:37 +00:00
use Arma\ {
MapVal,
SvCol, SvRow, SvMat,
DiagView
};
2019-03-18 14:49:42 +00:00
/**
2019-03-27 08:29:00 +00:00
* Interface for dense matrices.
2019-03-18 14:49:42 +00:00
*
* @package Arma
*/
interface DenseMatrix extends Dense, Matrix
{
// Subview
2019-03-27 08:29:00 +00:00
/**
* {@inheritdoc}
*
* @param int $i
* @param int $j[optional]
2019-04-04 08:07:37 +00:00
* @return MapVal
2019-03-27 08:29:00 +00:00
*/
function __invoke($i, $j);
2019-03-27 08:29:00 +00:00
2019-03-18 14:49:42 +00:00
/**
* {@inheritdoc}
*
* @param int $i
* @param int $j[optional]
2019-04-04 08:07:37 +00:00
* @return MapVal
2019-03-18 14:49:42 +00:00
*/
function at($i, $j);
/**
* {@inheritdoc}
*
* @param int $col_number
2019-04-04 08:07:37 +00:00
* @return SvCol
2019-03-18 14:49:42 +00:00
*/
function col($col_number);
/**
* {@inheritdoc}
*
* @param int $row_number
2019-04-04 08:07:37 +00:00
* @return SvRow
2019-03-18 14:49:42 +00:00
*/
function row($row_number);
/**
* {@inheritdoc}
*
* @param int $first_col
* @param int $last_col
2019-04-04 08:07:37 +00:00
* @return SvMat
2019-03-18 14:49:42 +00:00
*/
function cols($first_col, $last_col);
/**
* {@inheritdoc}
*
* @param int $first_row
* @param int $last_row
2019-04-04 08:07:37 +00:00
* @return SvMat
2019-03-18 14:49:42 +00:00
*/
function rows($first_row, $last_row);
/**
* {@inheritdoc}
*
* @param int $first_row
* @param int $first_col
* @param int $last_row
* @param int $last_col
2019-04-04 08:07:37 +00:00
* @return SvMat
2019-03-18 14:49:42 +00:00
*/
function submat($first_row, $first_col, $last_row, $last_col);
/**
* {@inheritdoc}
*
* @param int $k[optional]
2019-04-04 08:07:37 +00:00
* @return DiagView
2019-03-18 14:49:42 +00:00
*/
function diag($k = 0);
2019-03-21 10:49:11 +00:00
// Iteration
/**
* Apply a callback function to each row of the matrix.
*
2019-04-04 08:07:37 +00:00
* @param callable $action (SvRow) -> void
2019-03-21 10:49:11 +00:00
* @return void
*/
function eachRow($action);
/**
* Apply a callback function to each column of the matrix.
*
2019-04-04 08:07:37 +00:00
* @param callable $action (SvCol) -> void
2019-03-21 10:49:11 +00:00
* @return void
*/
function eachCol($action);
// Transform
/**
* Returns an inverse of the matrix.
*
2019-06-11 10:18:40 +00:00
* If matrix is know to be symmetric positive definite, it's faster when $inv_sympd is true.
*
* @param bool $inv_sympd[optional]
2019-03-21 10:49:11 +00:00
* @return DenseMatrix
*/
2019-06-11 10:18:40 +00:00
function i($inv_sympd = false);
/**
* Check whether the matrix is symmetric/hermitian positive definite within the tolerance given by $tol.
*
* @param number $tol[optional]
* @return bool
*/
function isSympd($tol);
2019-03-21 10:49:11 +00:00
}