2019-02-05 13:31:16 +00:00
|
|
|
<?php
|
|
|
|
|
2019-02-07 11:39:47 +00:00
|
|
|
namespace Arma\Internal;
|
2019-02-05 13:31:16 +00:00
|
|
|
|
2019-02-15 05:44:52 +00:00
|
|
|
/**
|
|
|
|
* Interface for objects which support arithmetic operations.
|
|
|
|
*
|
|
|
|
* @package Arma\Internal
|
|
|
|
*/
|
2019-02-07 11:39:47 +00:00
|
|
|
interface Operable extends Accessible
|
2019-02-05 13:31:16 +00:00
|
|
|
{
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Addition of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return static
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function add($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Subtraction of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return static
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function sub($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Negation of the object.
|
|
|
|
*
|
|
|
|
* @return static
|
|
|
|
*/
|
|
|
|
function neg();
|
|
|
|
|
|
|
|
/**
|
|
|
|
* Matrix multiplication of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return static
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function mul($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* 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
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function div($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise equality evaluation of two objects.
|
|
|
|
*
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
|
|
|
function equals($other);
|
2019-02-05 13:31:16 +00:00
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise non-equality evaluation of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function notEquals($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise "greater than" evaluation of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function greaterThan($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise "smaller than" evaluation of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function smallerThan($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise "not greater than" evaluation of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function notGreaterThan($other);
|
|
|
|
|
2019-02-14 11:11:36 +00:00
|
|
|
/**
|
|
|
|
* Element-wise "not smaller than" evaluation of two objects.
|
|
|
|
*
|
|
|
|
* @param static $other
|
|
|
|
* @return \Arma\IMat
|
|
|
|
*/
|
2019-02-05 13:31:16 +00:00
|
|
|
function notSmallerThan($other);
|
|
|
|
}
|