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

<?php
namespace Arma\Internal;
use Arma\ {
MapVal,
SvCol, SvRow, SvMat,
DiagView
};
/**
* Interface for dense matrices.
*
* @package Arma
*/
interface DenseMatrix extends Dense, Matrix
{
// Subview
/**
* {@inheritdoc}
*
* @param int $i
* @param int $j[optional]
* @return MapVal
*/
function __invoke($i, $j);
/**
* {@inheritdoc}
*
* @param int $i
* @param int $j[optional]
* @return MapVal
*/
function at($i, $j);
/**
* {@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 int $k[optional]
* @return DiagView
*/
function diag($k = 0);
// Iteration
/**
* Apply a callback function to each row of the matrix.
*
* @param callable $action (SvRow) -> void
* @return void
*/
function eachRow($action);
/**
* Apply a callback function to each column of the matrix.
*
* @param callable $action (SvCol) -> void
* @return void
*/
function eachCol($action);
// Transform
/**
* Returns an inverse of the matrix.
*
* If matrix is know to be symmetric positive definite, it's faster when $inv_sympd is true.
*
* @param bool $inv_sympd[optional]
* @return DenseMatrix
*/
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);
}