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

135 lines
2.3 KiB
PHP
Raw Normal View History

2019-03-18 14:49:42 +00:00
<?php
namespace Arma\Internal;
/**
* Interface for a dense matrix.
*
* @package Arma
*/
interface DenseMatrix extends Dense, Matrix
{
// Subview
/**
* {@inheritdoc}
*
* @param int $i
* @param int $j[optional]
2019-03-23 16:24:34 +00:00
* @return \Arma\MapVal
2019-03-18 14:49:42 +00:00
*/
function at($i, $j);
/**
* {@inheritdoc}
*
* @param int $col_number
* @return \Arma\SvCol
*/
function col($col_number);
/**
* {@inheritdoc}
*
* @param int $row_number
* @return \Arma\SvRow
*/
function row($row_number);
/**
* {@inheritdoc}
*
* @param int $first_col
* @param int $last_col
* @return \Arma\SvMat
*/
function cols($first_col, $last_col);
/**
* {@inheritdoc}
*
* @param int $first_row
* @param int $last_row
* @return \Arma\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 \Arma\SvMat
*/
function submat($first_row, $first_col, $last_row, $last_col);
/**
* {@inheritdoc}
*
* @param int $n_cols
* @return \Arma\SvMat
*/
function head_cols($n_cols);
/**
* {@inheritdoc}
*
* @param int $n_rows
* @return \Arma\SvMat
*/
function head_rows($n_rows);
/**
* {@inheritdoc}
*
* @param int $n_cols
* @return \Arma\SvMat
*/
function tail_cols($n_cols);
/**
* {@inheritdoc}
*
* @param int $n_rows
* @return \Arma\SvMat
*/
function tail_rows($n_rows);
/**
* {@inheritdoc}
*
* @param int $k[optional]
* @return \Arma\DiagView
*/
function diag($k = 0);
2019-03-21 10:49:11 +00:00
// Iteration
/**
* Apply a callback function to each row of the matrix.
*
* @param callable $action (\Arma\SvRow) -> void
* @return void
*/
function eachRow($action);
/**
* Apply a callback function to each column of the matrix.
*
* @param callable $action (\Arma\SvCol) -> void
* @return void
*/
function eachCol($action);
// Transform
/**
* Returns an inverse of the matrix.
*
* @return DenseMatrix
*/
function i();
}