HumHub Documentation (unofficial)

Division extends Multiplication
in package

Table of Contents

Properties

$columns  : mixed
Number of columns in the matrix
$matrix  : mixed
Stored internally as a 2-dimension array of values
$rows  : mixed
Number of rows in the matrix

Methods

__construct()  : mixed
Create an new handler object for the operation
execute()  : $this
Execute the division
result()  : Matrix
Return the result of the operation
multiplyMatrix()  : $this
Execute the multiplication for a matrix
multiplyScalar()  : $this
Execute the multiplication for a scalar
validateMatchingDimensions()  : void
Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction
validateReflectingDimensions()  : void
Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division

Properties

$columns

Number of columns in the matrix

protected mixed $columns

$matrix

Stored internally as a 2-dimension array of values

protected mixed $matrix

$rows

Number of rows in the matrix

protected mixed $rows

Methods

__construct()

Create an new handler object for the operation

public __construct(Matrix $matrix) : mixed
Parameters
$matrix : Matrix

The base Matrix object on which the operation will be performed

execute()

Execute the division

public execute(mixed $value[, string $type = 'division' ]) : $this
Parameters
$value : mixed

The matrix or numeric value to divide the current base value by

$type : string = 'division'
Tags
throws
Exception

If the provided argument is not appropriate for the operation

Return values
$this

The operation object, allowing multiple divisions to be chained

multiplyMatrix()

Execute the multiplication for a matrix

protected multiplyMatrix(Matrix $value[, string $type = 'multiplication' ]) : $this
Parameters
$value : Matrix

The numeric value to multiply with the current base value

$type : string = 'multiplication'
Tags
throws
Exception

If the provided argument is not appropriate for the operation

Return values
$this

The operation object, allowing multiple mutiplications to be chained

multiplyScalar()

Execute the multiplication for a scalar

protected multiplyScalar(mixed $value[, string $type = 'multiplication' ]) : $this
Parameters
$value : mixed

The numeric value to multiply with the current base value

$type : string = 'multiplication'
Return values
$this

The operation object, allowing multiple mutiplications to be chained

validateMatchingDimensions()

Compare the dimensions of the matrices being operated on to see if they are valid for addition/subtraction

protected validateMatchingDimensions(Matrix $matrix) : void
Parameters
$matrix : Matrix

The second Matrix object on which the operation will be performed

Tags
throws
Exception

validateReflectingDimensions()

Compare the dimensions of the matrices being operated on to see if they are valid for multiplication/division

protected validateReflectingDimensions(Matrix $matrix) : void
Parameters
$matrix : Matrix

The second Matrix object on which the operation will be performed

Tags
throws
Exception

        
On this page

Search results