| @@ 104-113 (lines=10) @@ | ||
| 101 | * @return Partition[] |
|
| 102 | * An array of partitions. |
|
| 103 | */ |
|
| 104 | public function getPartitions() { |
|
| 105 | $data = array(); |
|
| 106 | $clone = clone $this; |
|
| 107 | ||
| 108 | for ($clone->top(); $clone->valid(); $clone->next()) { |
|
| 109 | $data[] = $clone->current(); |
|
| 110 | } |
|
| 111 | ||
| 112 | return $data; |
|
| 113 | } |
|
| 114 | ||
| 115 | /** |
|
| 116 | * Return the items from each partitions in the container. |
|
| @@ 63-72 (lines=10) @@ | ||
| 60 | /** |
|
| 61 | * @return Subset[] |
|
| 62 | */ |
|
| 63 | public function getSubsets() { |
|
| 64 | $data = array(); |
|
| 65 | $clone = clone $this; |
|
| 66 | ||
| 67 | for($clone->top(); $clone->valid(); $clone->next()) { |
|
| 68 | $data[] = $clone->current(); |
|
| 69 | } |
|
| 70 | ||
| 71 | return $data; |
|
| 72 | } |
|
| 73 | ||
| 74 | /** |
|
| 75 | * @return array |
|