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/MatBase.php

115 lines
2.6 KiB
PHP
Raw Normal View History

2019-02-15 05:44:52 +00:00
<?php
namespace Arma\Internal;
/**
2019-02-24 03:39:51 +00:00
* Interface for matrices (Mat and SpMat).
2019-02-15 05:44:52 +00:00
*
* @package Arma\Internal
*/
2019-03-07 15:19:47 +00:00
interface MatBase extends Splittable
2019-02-15 05:44:52 +00:00
{
/**
* Set the elements of an object to zero, optionally first changing the size to specified dimensions.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
2019-02-22 01:54:21 +00:00
* @return void
2019-02-15 05:44:52 +00:00
*/
function zeros($n_rows, $n_cols);
/**
* Set the elements along the main diagonal to one and off-diagonal elements to zero, optionally
* first changing the size to specified dimensions.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
* @return void
*/
function eye($n_rows, $n_cols);
/**
* Recreate the object according to given size specifications, with the elements taken from the
* previous version of the object in a column-wise manner.
*
* The elements in the generated object are placed column-wise.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
* @return void
*/
function reshape($n_rows, $n_cols);
/**
* Recreate the object according to given size specifications, while preserving the elements
* as well as the layout of the elements.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
* @return void
*/
function resize($n_rows, $n_cols);
2019-02-23 02:07:23 +00:00
/**
* Change the size of an object, without explicitly preserving data and without initialising the elements.
*
* @param $n_rows[optional]
* @param $n_cols[optional]
* @return void
*/
function setSize($n_rows, $n_cols);
2019-02-15 05:44:52 +00:00
/**
* Read/write access to a diagonal in a matrix.
*
* For k=0 the main diagonal is accessed. For k > 0, the k-th super-diagonal is accessed (top-right corner).
* For k < 0, the k-th sub-diagonal is accessed (bottom-left corner).
*
* @param int $k
2019-03-07 15:19:47 +00:00
* @return Subview
2019-02-15 05:44:52 +00:00
*/
function diag($k = 0);
/**
* Check whether the matrix has exactly one column or one row.
*
* @return bool
*/
function isVec();
/**
* Check whether the matrix has exactly one column.
*
* @return bool
*/
function isColvec();
/**
* Check whether the matrix has exactly one row.
*
* @return bool
*/
function isRowvec();
/**
* Check whether the matrix is square.
*
* @return bool
*/
function isSquare();
/**
* Check whether the matrix is symmetric.
*
* @return bool
*/
function isSymmetric();
/**
* Check whether the matrix is hermitian.
*
* @return bool
*/
function isHermitian();
}