Index

ArithmeticOperation

MMO\math\operations · 1 symbol · generated 30 Sep 2026

class

ArithmeticOperation

ArithmeticOperation.php:12
class MMO\math\operations\ArithmeticOperation extends MMO\math\operations\Operation implements MMO\math\interfaces\iFactorableNumber
Namespace
MMO\math\operations
Extends
Operation
Implements
iFactorableNumber

Index

divideBy($factor)
loopPolynomialUnits()Yield Number and their polynomial factors.
multiplyBy($factor)
powerBy($power)
simplify()NOT needed, all the simplification/expansion are done in the parser
toPolynome($number)
__construct($operator, $a, $b)

Methods7

loopPolynomialUnits()

ArithmeticOperation.php:189

Yield Number and their polynomial factors.

function loopPolynomialUnits(): GeneratorPolynomial factors are arrays of factors corresponding to the power of the Number:
returnsGenerator
[0 => 2, 1 => 5] => 5x + 2 [2 => -66] => -66x^2 [-1 => 33, 1 => 25, 3 => 66] => 66x^3 + 25x + 33/x
Inherited members (32)
PropertiesDeclared byDescription
contentOperation
operatorOperation
MethodsDeclared byDescription
addListener($callable, $target)Operation
canCommute()Operation
canInverseEquality()Operation
clear()OperationEmpty the underlying content, keeping the object itself.
commute()Operation
compareTo($value)Operation
contains($num)OperationTest if operation contains the number or an instance of it
count()Operation\Countable::count
debugName()Operation
execute()Operation
extract($num, $result)Operation
getIterator()Operation\IteratorAggregate::getIterator
getOperator()Operation
hasUnits()Operation
intervals()Operation
inverseEquality($value)Operation
isEmpty()Operation
jsonSerialize()Operation\JsonSerializable::jsonSerialize -- the raw content is returned as-is (not recursively converted), so json_encode() relies on any nested iArray values being JsonSerializable themselves.
keys()Operation
loadArray($data)OperationLoad every entry of a plain array into the content, through offsetSet (so any offsetSet() override defined by the class using this trait, e.g.
loopNumber()Operation
numberValue()Operation
offsetExists($key)Operation\ArrayAccess::offsetExists
offsetGet($key)Operation\ArrayAccess::offsetGet
offsetSet($key, $value)Operation\ArrayAccess::offsetSet -- a null $key appends ($bag[] = $value), like a plain PHP array.
offsetUnset($key)Operation\ArrayAccess::offsetUnset -- on a list (sequential integer keys, as produced by $bag[] = ...), the element is spliced out (closing the gap and reindexing), matching \unset() semantics on a plain …
removeListener($callable)Operation
toArray()OperationConvert the content to a plain array, recursively converting any nested iArray value (e.g.
units()OperationGet the units of this operation.
__toString()Operation