power() public static method

Creates the power set of A.
public static power ( Set $a ) : array
$a Set
return array
Example #1
0
 public function testPower()
 {
     $power = Set::power(new Set(['A', 'B']));
     $this->assertInternalType('array', $power);
     $this->assertEquals([new Set(), new Set(['A']), new Set(['B']), new Set(['A', 'B'])], $power);
     $this->assertEquals(4, count($power));
 }