Overview

Packages

  • JAMA
  • None
  • PHP
  • PHPExcel
    • CachedObjectStorage
    • Calculation
    • Cell
    • Chart
      • Renderer
    • Reader
      • Excel2007
      • Excel5
    • RichText
    • Settings
    • Shared
      • Escher
      • OLE
      • Trend
      • ZipArchive
    • Style
    • Worksheet
      • Drawing
    • Writer
      • 2007
      • CSV
      • Excel2007
      • Excel5
      • HTML
      • PDF

Classes

  • CholeskyDecomposition
  • EigenvalueDecomposition
  • PHPExcel_Shared_JAMA_LUDecomposition
  • PHPExcel_Shared_JAMA_Matrix
  • PHPExcel_Shared_JAMA_QRDecomposition
  • SingularValueDecomposition

Functions

  • hypo
  • JAMAError
  • Overview
  • Package
  • Class
  • Tree
  • Deprecated
  • Todo
  • Download

Class PHPExcel_Shared_JAMA_Matrix

Package: JAMA
Located at controlador/include/phpexcel/PHPExcel/Shared/JAMA/Matrix.php
Methods summary
public
# __construct( )

Polymorphic constructor

Polymorphic constructor

As PHP has no support for polymorphic constructors, we hack our own sort of polymorphism using func_num_args, func_get_arg, and gettype. In essence, we're just implementing a simple RTTI filter and calling the appropriate constructor.

public array
# getArray( )

getArray

getArray

Returns

array
Matrix array
public integer
# getRowDimension( )

getRowDimension

getRowDimension

Returns

integer
Row dimension
public integer
# getColumnDimension( )

getColumnDimension

getColumnDimension

Returns

integer
Column dimension
public mixed
# get( integer $i = null, integer $j = null )

get

get

Get the i,j-th element of the matrix.

Parameters

$i
Row position
$j
Column position

Returns

mixed
Element (int/float/double)
public Matrix
# getMatrix( integer $i0,…, integer $iF,…, integer $j0,…, integer $jF,… )

getMatrix

getMatrix

Get a submatrix

Parameters

$i0,…
Initial row index
$iF,…
Final row index
$j0,…
Initial column index
$jF,…
Final column index

Returns

Matrix
Submatrix
public boolean
# checkMatrixDimensions( Matrix $B = null )

checkMatrixDimensions

checkMatrixDimensions

Is matrix B the same size?

Parameters

$B
Matrix B

Returns

boolean
public mixed
# set( integer $i = null, integer $j = null, mixed $c = null )

set

set

Set the i,j-th element of the matrix.

Parameters

$i
Row position
$j
Column position
$c
Int/float/double value

Returns

mixed
Element (int/float/double)
public Matrix
# identity( integer $m = null, integer $n = null )

identity

identity

Generate an identity matrix.

Parameters

$m
Row dimension
$n
Column dimension

Returns

Matrix
Identity matrix
public Matrix
# diagonal( integer $m = null, integer $n = null, mixed $c = 1 )

diagonal

diagonal

Generate a diagonal matrix

Parameters

$m
Row dimension
$n
Column dimension
$c
Diagonal value

Returns

Matrix
Diagonal matrix
public Matrix
# getMatrixByRow( integer $i0 = null, integer $iF = null )

getMatrixByRow

getMatrixByRow

Get a submatrix by row index/range

Parameters

$i0
Initial row index
$iF
Final row index

Returns

Matrix
Submatrix
public Matrix
# getMatrixByCol( integer $j0 = null, integer $jF = null )

getMatrixByCol

getMatrixByCol

Get a submatrix by column index/range

Parameters

$j0
$i0 Initial column index
$jF
$iF Final column index

Returns

Matrix
Submatrix
public Matrix
# transpose( )

transpose

transpose

Tranpose matrix

Returns

Matrix
Transposed matrix
public float
# trace( )

trace

trace

Sum of diagonal elements

Returns

float
Sum of diagonal elements
public Matrix
# uminus( )

uminus

uminus

Unary minus matrix -A

Returns

Matrix
Unary minus matrix
public Matrix
# plus( mixed $B,… )

plus

plus

A + B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# plusEquals( mixed $B,… )

plusEquals

plusEquals

A = A + B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# minus( mixed $B,… )

minus

minus

A - B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# minusEquals( mixed $B,… )

minusEquals

minusEquals

A = A - B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# arrayTimes( mixed $B,… )

arrayTimes

arrayTimes

Element-by-element multiplication Cij = Aij * Bij

Parameters

$B,…
Matrix/Array

Returns

Matrix
Matrix Cij
public Matrix
# arrayTimesEquals( mixed $B,… )

arrayTimesEquals

arrayTimesEquals

Element-by-element multiplication Aij = Aij * Bij

Parameters

$B,…
Matrix/Array

Returns

Matrix
Matrix Aij
public Matrix
# arrayRightDivide( Matrix $B,… )

arrayRightDivide

arrayRightDivide

Element-by-element right division A / B

Parameters

$B,…
Matrix B

Returns

Matrix
Division result
public Matrix
# arrayRightDivideEquals( mixed $B,… )

arrayRightDivideEquals

arrayRightDivideEquals

Element-by-element right division Aij = Aij / Bij

Parameters

$B,…
Matrix/Array

Returns

Matrix
Matrix Aij
public Matrix
# arrayLeftDivide( Matrix $B,… )

arrayLeftDivide

arrayLeftDivide

Element-by-element Left division A / B

Parameters

$B,…
Matrix B

Returns

Matrix
Division result
public Matrix
# arrayLeftDivideEquals( mixed $B,… )

arrayLeftDivideEquals

arrayLeftDivideEquals

Element-by-element Left division Aij = Aij / Bij

Parameters

$B,…
Matrix/Array

Returns

Matrix
Matrix Aij
public Matrix
# times( mixed $n,… )

times

times

Matrix multiplication

Parameters

$n,…
Matrix/Array/Scalar

Returns

Matrix
Product
public Matrix
# power( mixed $B,… )

power

power

A = A ^ B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# concat( mixed $B,… )

concat

concat

A = A & B

Parameters

$B,…
Matrix/Array

Returns

Matrix
Sum
public Matrix
# solve( Matrix $B )

Solve A*X = B.

Solve A*X = B.

Parameters

$B
Right hand side

Returns

Matrix
... Solution if A is square, least squares solution otherwise
public Matrix
# inverse( )

Matrix inverse or pseudoinverse.

Matrix inverse or pseudoinverse.

Returns

Matrix
... Inverse(A) if A is square, pseudoinverse otherwise.
public float
# det( )

det

det

Calculate determinant

Returns

float
Determinant
Constants summary
string PolymorphicArgumentException
# "Invalid argument pattern for polymorphic function."
string ArgumentTypeException
# "Invalid argument type."
string ArgumentBoundsException
# "Invalid argument range."
string MatrixDimensionException
# "Matrix dimensions are not equal."
string ArrayLengthException
# "Array length must be a multiple of m."
Properties summary
public array $A

Matrix storage

Matrix storage

# array()
private integer $m

Matrix row dimension

Matrix row dimension

#
private integer $n

Matrix column dimension

Matrix column dimension

#
Autene API documentation generated by ApiGen