PHP Class MathPHP\SetTheory\SetOperationsTest

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

Public Methods

Method Description
dataProviderForAdd ( )
dataProviderForAddMulti ( )
dataProviderForCartesianProduct ( )
dataProviderForDifference ( )
dataProviderForDifferenceMultiSet ( )
dataProviderForIntersect ( )
dataProviderForIntersectMultipleSets ( )
dataProviderForIsDisjoint ( )
dataProviderForIsNotSubset ( )
dataProviderForIsProperSet ( )
dataProviderForIsSubsetSuperset ( )
dataProviderForNotDisjoint ( )
dataProviderForPowerSet ( )
dataProviderForRemove ( )
dataProviderForRemoveMulti ( )
dataProviderForSingleSet ( )
dataProviderForSymmetricDifference ( )
dataProviderForUnion ( )
dataProviderForUnionMultipleSets ( )
testAdd ( array $A, $x, array $R )
testAddMulti ( array $A, array $x, array $R )
testAddMultiWithArrayOfArrays ( ) In this case, we add an array that contains arrays.
testAddMultiWithArrayOfArraysMultipleArraysAndDuplicates ( ) In this case, we add an array that contains arrays.
testAddTwiceDoesNothing ( array $A, $x, array $R )
testAddWithDuplicateObjects ( )
testAddWithMultipleObjects ( )
testAddWithObjects ( ) When adding objects to a set, the key becomes to the objects hash.
testAddWithResources ( ) When adding resources to a set, the key becomes to the resource ID.
testCartesianProduct ( array $A, array $B, array $A×B, Set $R )
testClear ( array $members )
testCopy ( array $members )
testDifference ( array $A, array $B, array $diff, Set $R )
testDifferenceMultiSet ( array $A, array $B, array $C, array $diff, Set $R )
testDifferenceWithArrays ( )
testDifferenceWithObjects ( )
testIntersect ( array $A, array $B, array $A∩B, Set $R )
testIntersectMultipleSets ( array $A, array $B, array $C, array $A∩B∩C, Set $R )
testIntersectWithArrays ( )
testIntersectWithObjects ( )
testIsDisjoint ( array $A, array $B )
testIsNotSubset ( array $A, array $B )
testIsProperSubset ( array $A, array $B )
testIsProperSuperset ( array $A, array $B )
testIsSubset ( array $A, array $B )
testIsSuperset ( array $A, array $B )
testNotDisjoint ( array $A, array $B )
testPowerSet ( Set $A, Set $expected )
testRemove ( array $A, $x, array $R )
testRemoveMulti ( array $A, array $x, array $R )
testSymmetricDifference ( array $A, array $B, array $diff, Set $R )
testSymmetricDifferenceWithArrays ( )
testSymmetricDifferenceWithObjects ( )
testUnion ( array $A, array $B, array $A∪B, Set $R )
testUnionMultipleSets ( array $A, array $B, array $C, array $A∪B∪C, Set $R )
testUnionWithArrays ( )
testUnionWithObjects ( )

Method Details

dataProviderForAdd() public method

public dataProviderForAdd ( )

dataProviderForAddMulti() public method

dataProviderForCartesianProduct() public method

dataProviderForDifference() public method

dataProviderForDifferenceMultiSet() public method

dataProviderForIntersect() public method

dataProviderForIntersectMultipleSets() public method

dataProviderForIsDisjoint() public method

dataProviderForIsNotSubset() public method

dataProviderForIsProperSet() public method

dataProviderForIsSubsetSuperset() public method

dataProviderForNotDisjoint() public method

dataProviderForPowerSet() public method

dataProviderForRemove() public method

dataProviderForRemoveMulti() public method

dataProviderForSingleSet() public method

dataProviderForSymmetricDifference() public method

dataProviderForUnion() public method

dataProviderForUnionMultipleSets() public method

testAdd() public method

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

testAddMulti() public method

public testAddMulti ( array $A, array $x, array $R )
$A array
$x array
$R array

testAddMultiWithArrayOfArrays() public method

So each array element will be added, but with the implementation detail that they will be converted into ArrayObjects.

testAddMultiWithArrayOfArraysMultipleArraysAndDuplicates() public method

So each array element will be added, but with the implementation detail that they will be converted into ArrayObjects.

testAddTwiceDoesNothing() public method

public testAddTwiceDoesNothing ( array $A, $x, array $R )
$A array
$R array

testAddWithDuplicateObjects() public method

testAddWithMultipleObjects() public method

testAddWithObjects() public method

The object is stored as is as the value.
public testAddWithObjects ( )

testAddWithResources() public method

The resource is stored as is as the value.

testCartesianProduct() public method

public testCartesianProduct ( array $A, array $B, array $A×B, Set $R )
$A array
$B array
$A×B array
$R Set

testClear() public method

public testClear ( array $members )
$members array

testCopy() public method

public testCopy ( array $members )
$members array

testDifference() public method

public testDifference ( array $A, array $B, array $diff, Set $R )
$A array
$B array
$diff array
$R Set

testDifferenceMultiSet() public method

public testDifferenceMultiSet ( array $A, array $B, array $C, array $diff, Set $R )
$A array
$B array
$C array
$diff array
$R Set

testDifferenceWithArrays() public method

testDifferenceWithObjects() public method

testIntersect() public method

public testIntersect ( array $A, array $B, array $A∩B, Set $R )
$A array
$B array
$A∩B array
$R Set

testIntersectMultipleSets() public method

public testIntersectMultipleSets ( array $A, array $B, array $C, array $A∩B∩C, Set $R )
$A array
$B array
$C array
$A∩B∩C array
$R Set

testIntersectWithArrays() public method

testIntersectWithObjects() public method

testIsDisjoint() public method

public testIsDisjoint ( array $A, array $B )
$A array
$B array

testIsNotSubset() public method

public testIsNotSubset ( array $A, array $B )
$A array
$B array

testIsProperSubset() public method

public testIsProperSubset ( array $A, array $B )
$A array
$B array

testIsProperSuperset() public method

public testIsProperSuperset ( array $A, array $B )
$A array
$B array

testIsSubset() public method

public testIsSubset ( array $A, array $B )
$A array
$B array

testIsSuperset() public method

public testIsSuperset ( array $A, array $B )
$A array
$B array

testNotDisjoint() public method

public testNotDisjoint ( array $A, array $B )
$A array
$B array

testPowerSet() public method

public testPowerSet ( Set $A, Set $expected )
$A Set
$expected Set

testRemove() public method

public testRemove ( array $A, $x, array $R )
$A array
$R array

testRemoveMulti() public method

public testRemoveMulti ( array $A, array $x, array $R )
$A array
$x array
$R array

testSymmetricDifference() public method

public testSymmetricDifference ( array $A, array $B, array $diff, Set $R )
$A array
$B array
$diff array
$R Set

testSymmetricDifferenceWithArrays() public method

testSymmetricDifferenceWithObjects() public method

testUnion() public method

public testUnion ( array $A, array $B, array $A∪B, Set $R )
$A array
$B array
$A∪B array
$R Set

testUnionMultipleSets() public method

public testUnionMultipleSets ( array $A, array $B, array $C, array $A∪B∪C, Set $R )
$A array
$B array
$C array
$A∪B∪C array
$R Set

testUnionWithArrays() public method

public testUnionWithArrays ( )

testUnionWithObjects() public method