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/Operable.php
2019-02-21 18:49:25 +08:00

108 lines
2.0 KiB
PHP

<?php
namespace Arma\Internal;
/**
* Interface for objects which support arithmetic operations.
*
* @package Arma\Internal
*/
interface Operable
{
/**
* Addition of two objects.
*
* @param static $other
* @return static
*/
function add($other);
/**
* Subtraction of two objects.
*
* @param static $other
* @return static
*/
function sub($other);
/**
* Negation of the object.
*
* @return static
*/
function neg();
/**
* Matrix multiplication of two objects.
*
* @param static $other
* @return static
*/
function mul($other);
/**
* Element-wise multiplication of two objects.
*
* @param static $other
* @return static
*/
function dotMul($other);
/**
* Element-wise division of an object by another object or a scalar.
*
* @param static|number $other
* @return static
*/
function div($other);
/**
* Element-wise equality evaluation of two objects.
*
*
* @param static $other
* @return \Arma\IMat
*/
function equals($other);
/**
* Element-wise non-equality evaluation of two objects.
*
* @param static $other
* @return \Arma\IMat
*/
function notEquals($other);
/**
* Element-wise "greater than" evaluation of two objects.
*
* @param static $other
* @return \Arma\IMat
*/
function greaterThan($other);
/**
* Element-wise "smaller than" evaluation of two objects.
*
* @param static $other
* @return \Arma\IMat
*/
function smallerThan($other);
/**
* Element-wise "not greater than" evaluation of two objects.
*
* @param static $other
* @return \Arma\IMat
*/
function notGreaterThan($other);
/**
* Element-wise "not smaller than" evaluation of two objects.
*
* @param static $other
* @return \Arma\IMat
*/
function notSmallerThan($other);
}