Moodle PHP Documentation 4.1
Moodle 4.1.18+ (Build: 20250530) (7e19a2a6401)
|
Public Member Functions | |
__construct (array $elements=[]) | |
add ($element) | |
addAll (array $elements) | |
cardinality () | |
contains ($element) | |
containsAll (array $elements) | |
getIterator () | |
isEmpty () | |
remove ($element) | |
removeAll (array $elements) | |
toArray () | |
Static Public Member Functions | |
static | cartesian (self $a, self $b) |
Creates the Cartesian product of A and B. | |
static | difference (self $a, self $b) |
Creates the difference of A and B. | |
static | intersection (self $a, self $b) |
Creates the intersection of A and B. | |
static | power (self $a) |
Creates the power set of A. | |
static | union (self $a, self $b) |
Creates the union of A and B. | |
Phpml\Math\Set::__construct | ( | array | $elements = [] | ) |
string[] | int[] | float[] | bool[] | $elements |
Phpml\Math\Set::add | ( | $element | ) |
string | int | float | bool | $element |
Phpml\Math\Set::addAll | ( | array | $elements | ) |
string[] | int[] | float[] | bool[] | $elements |
|
static |
Creates the Cartesian product of A and B.
Set[] |
Phpml\Math\Set::contains | ( | $element | ) |
string | int | float | $element |
Phpml\Math\Set::containsAll | ( | array | $elements | ) |
string[] | int[] | float[] | $elements |
|
static |
Creates the power set of A.
Set[] |
Phpml\Math\Set::remove | ( | $element | ) |
string | int | float | $element |
Phpml\Math\Set::removeAll | ( | array | $elements | ) |
string[] | int[] | float[] | $elements |
Phpml\Math\Set::toArray | ( | ) |
string[]|int[]|float[]|bool[] |