cartesian() public static method

Creates the Cartesian product of A and B.
public static cartesian ( Set $a, Set $b ) : array
$a Set
$b Set
return array
Example #1
0
 public function testCartesian()
 {
     $cartesian = Set::cartesian(new Set(['A']), new Set([1, 2]));
     $this->assertInternalType('array', $cartesian);
     $this->assertEquals([new Set(['A', 1]), new Set(['A', 2])], $cartesian);
     $this->assertEquals(2, count($cartesian));
 }