102 lines
1.6 KiB
PHP
102 lines
1.6 KiB
PHP
<?php
|
|
|
|
namespace Arma\Internal;
|
|
|
|
use Arma\SpSvMat;
|
|
use Arma\SpDiagView;
|
|
|
|
/**
|
|
* Interface for sparse matrices.
|
|
*
|
|
* @package Arma
|
|
*/
|
|
interface SparseMatrix extends Sparse, Matrix
|
|
{
|
|
// Subview
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $col_number
|
|
* @return SpSvMat
|
|
*/
|
|
function col($col_number);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $row_number
|
|
* @return SpSvMat
|
|
*/
|
|
function row($row_number);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $first_col
|
|
* @param int $last_col
|
|
* @return SpSvMat
|
|
*/
|
|
function cols($first_col, $last_col);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $first_row
|
|
* @param int $last_row
|
|
* @return SpSvMat
|
|
*/
|
|
function rows($first_row, $last_row);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $first_row
|
|
* @param int $first_col
|
|
* @param int $last_row
|
|
* @param int $last_col
|
|
* @return SpSvMat
|
|
*/
|
|
function submat($first_row, $first_col, $last_row, $last_col);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $n_cols
|
|
* @return SpSvMat
|
|
*/
|
|
function head_cols($n_cols);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $n_rows
|
|
* @return SpSvMat
|
|
*/
|
|
function head_rows($n_rows);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $n_cols
|
|
* @return SpSvMat
|
|
*/
|
|
function tail_cols($n_cols);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $n_rows
|
|
* @return SpSvMat
|
|
*/
|
|
function tail_rows($n_rows);
|
|
|
|
/**
|
|
* {@inheritdoc}
|
|
*
|
|
* @param int $k[optional]
|
|
* @return SpDiagView
|
|
*/
|
|
function diag($k = 0);
|
|
}
|