PHP Class MathPHP\LinearAlgebra\MatrixOperationsTest

Inheritance: extends PHPUnit_Framework_TestCase
Show file Open project: markrogoyski/math-php

Public Methods

Method Description
dataProviderForAdd ( )
dataProviderForAugment ( )
dataProviderForAugmentBelow ( )
dataProviderForAugmentIdentity ( )
dataProviderForCofactor ( )
dataProviderForCofactorMatrix ( )
dataProviderForDet ( )
dataProviderForDiagonal ( )
dataProviderForDirectSum ( )
dataProviderForHadamardProduct ( )
dataProviderForInverse ( )
dataProviderForInverseExceptionDetIsZero ( )
dataProviderForInverseExceptionNotSquare ( )
dataProviderForKroneckerProduct ( )
dataProviderForMinor ( )
dataProviderForMinorMatrix ( )
dataProviderForMultiply ( )
dataProviderForMultiplyVector ( )
dataProviderForScalarMultiply ( )
dataProviderForSubtract ( )
dataProviderForTrace ( )
dataProviderForTranspose ( )
setUp ( )
testAdd ( array $A, array $B, array $R )
testAddExceptionColumns ( )
testAddExceptionRows ( )
testAugment ( array $A, array $B, array $⟮A∣B⟯ )
testAugmentBelow ( array $A, array $B, array $⟮A∣B⟯ )
testAugmentBelowExceptionColumnssDoNotMatch ( )
testAugmentExceptionRowsDoNotMatch ( )
testAugmentIdentity ( array $C, array $⟮C∣I⟯ )
testAugmentIdentityExceptionNotSquare ( )
testCofactor ( array $A, integer $mᵢ, integer $nⱼ, $Cᵢⱼ )
testCofactorExceptionBadColumn ( )
testCofactorExceptionBadRow ( )
testCofactorExceptionNotSquare ( )
testCofactorMatrix ( array $A, array $R )
testCofactorMatrixExceptionNotSquare ( )
testDet ( array $A, $det )
testDetExceptionNotSquareMatrix ( )
testDiagonal ( array $A, array $R )
testDirectSum ( array $A, array $B, array $R )
testHadamardProduct ( array $A, array $B, array $A∘B )
testHadamardProductDimensionsDoNotMatch ( )
testInverse ( array $A, array $A⁻¹ )
testInverseExceptionDetIsZero ( array $A )
testInverseExceptionNotSquare ( array $A )
testKroneckerProduct ( array $A, array $B, array $expected )
testMap ( )
testMinor ( array $A, integer $mᵢ, integer $nⱼ, $Mᵢⱼ )
testMinorExceptionBadColumn ( )
testMinorExceptionBadRow ( )
testMinorExceptionNotSquare ( )
testMinorMatrix ( array $A, integer $mᵢ, integer $nⱼ, array $Mᵢⱼ )
testMinorMatrixExceptionBadColumn ( )
testMinorMatrixExceptionBadRow ( )
testMinorMatrixExceptionNotSquare ( )
testMultiply ( array $A, array $B, array $R )
testMultiplyExceptionDimensionsDoNotMatch ( )
testMultiplyExceptionNotMatrixOrVector ( )
testMultiplyVector ( array $A, array $B, array $R )
testScalarMultiply ( array $A, $k, array $R )
testScalarMultiplyExceptionKNotNumber ( )
testSubtract ( array $A, array $B, array $R )
testSubtractExceptionColumns ( )
testSubtractExceptionRows ( )
testTrace ( array $A, $tr )
testTraceExceptionNotSquareMatrix ( )
testTranspose ( array $A, array $R )

Method Details

dataProviderForAdd() public method

public dataProviderForAdd ( )

dataProviderForAugment() public method

dataProviderForAugmentBelow() public method

dataProviderForAugmentIdentity() public method

dataProviderForCofactor() public method

dataProviderForCofactorMatrix() public method

dataProviderForDet() public method

public dataProviderForDet ( )

dataProviderForDiagonal() public method

dataProviderForDirectSum() public method

dataProviderForHadamardProduct() public method

dataProviderForInverse() public method

dataProviderForInverseExceptionDetIsZero() public method

dataProviderForInverseExceptionNotSquare() public method

dataProviderForKroneckerProduct() public method

dataProviderForMinor() public method

dataProviderForMinorMatrix() public method

dataProviderForMultiply() public method

dataProviderForMultiplyVector() public method

dataProviderForScalarMultiply() public method

dataProviderForSubtract() public method

dataProviderForTrace() public method

dataProviderForTranspose() public method

setUp() public method

public setUp ( )

testAdd() public method

public testAdd ( array $A, array $B, array $R )
$A array
$B array
$R array

testAddExceptionColumns() public method

testAddExceptionRows() public method

testAugment() public method

public testAugment ( array $A, array $B, array $⟮A∣B⟯ )
$A array
$B array
$⟮A∣B⟯ array

testAugmentBelow() public method

public testAugmentBelow ( array $A, array $B, array $⟮A∣B⟯ )
$A array
$B array
$⟮A∣B⟯ array

testAugmentBelowExceptionColumnssDoNotMatch() public method

testAugmentExceptionRowsDoNotMatch() public method

testAugmentIdentity() public method

public testAugmentIdentity ( array $C, array $⟮C∣I⟯ )
$C array
$⟮C∣I⟯ array

testAugmentIdentityExceptionNotSquare() public method

testCofactor() public method

public testCofactor ( array $A, integer $mᵢ, integer $nⱼ, $Cᵢⱼ )
$A array
$mᵢ integer
$nⱼ integer

testCofactorExceptionBadColumn() public method

testCofactorExceptionBadRow() public method

testCofactorExceptionNotSquare() public method

testCofactorMatrix() public method

public testCofactorMatrix ( array $A, array $R )
$A array
$R array

testCofactorMatrixExceptionNotSquare() public method

testDet() public method

public testDet ( array $A, $det )
$A array

testDetExceptionNotSquareMatrix() public method

testDiagonal() public method

public testDiagonal ( array $A, array $R )
$A array
$R array

testDirectSum() public method

public testDirectSum ( array $A, array $B, array $R )
$A array
$B array
$R array

testHadamardProduct() public method

public testHadamardProduct ( array $A, array $B, array $A∘B )
$A array
$B array
$A∘B array

testHadamardProductDimensionsDoNotMatch() public method

testInverse() public method

public testInverse ( array $A, array $A⁻¹ )
$A array
$A⁻¹ array

testInverseExceptionDetIsZero() public method

testInverseExceptionNotSquare() public method

testKroneckerProduct() public method

public testKroneckerProduct ( array $A, array $B, array $expected )
$A array
$B array
$expected array

testMap() public method

public testMap ( )

testMinor() public method

public testMinor ( array $A, integer $mᵢ, integer $nⱼ, $Mᵢⱼ )
$A array
$mᵢ integer
$nⱼ integer

testMinorExceptionBadColumn() public method

testMinorExceptionBadRow() public method

testMinorExceptionNotSquare() public method

testMinorMatrix() public method

public testMinorMatrix ( array $A, integer $mᵢ, integer $nⱼ, array $Mᵢⱼ )
$A array
$mᵢ integer
$nⱼ integer
$Mᵢⱼ array

testMinorMatrixExceptionBadColumn() public method

testMinorMatrixExceptionBadRow() public method

testMinorMatrixExceptionNotSquare() public method

testMultiply() public method

public testMultiply ( array $A, array $B, array $R )
$A array
$B array
$R array

testMultiplyExceptionDimensionsDoNotMatch() public method

testMultiplyExceptionNotMatrixOrVector() public method

testMultiplyVector() public method

public testMultiplyVector ( array $A, array $B, array $R )
$A array
$B array
$R array

testScalarMultiply() public method

public testScalarMultiply ( array $A, $k, array $R )
$A array
$R array

testScalarMultiplyExceptionKNotNumber() public method

testSubtract() public method

public testSubtract ( array $A, array $B, array $R )
$A array
$B array
$R array

testSubtractExceptionColumns() public method

testSubtractExceptionRows() public method

testTrace() public method

public testTrace ( array $A, $tr )
$A array

testTraceExceptionNotSquareMatrix() public method

testTranspose() public method

public testTranspose ( array $A, array $R )
$A array
$R array