| 1 | <?php |
||
| 5 | abstract class Combinatorics implements \Countable { |
||
| 6 | |||
| 7 | /** |
||
| 8 | * @var array |
||
| 9 | */ |
||
| 10 | protected $dataset; |
||
| 11 | |||
| 12 | /** |
||
| 13 | * @var int |
||
| 14 | */ |
||
| 15 | protected $datasetCount; |
||
| 16 | |||
| 17 | /** |
||
| 18 | * @var int |
||
| 19 | */ |
||
| 20 | protected $length; |
||
| 21 | |||
| 22 | /** |
||
| 23 | * Combinatorics constructor. |
||
| 24 | * |
||
| 25 | * @param array $dataset |
||
| 26 | * @param null $length |
||
| 27 | */ |
||
| 28 | 6 | public function __construct(array $dataset = array(), $length = NULL) { |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param int $length |
||
|
1 ignored issue
–
show
|
|||
| 36 | * |
||
| 37 | * @return $this |
||
| 38 | */ |
||
| 39 | 6 | public function setLength($length = NULL) { |
|
| 45 | |||
| 46 | /** |
||
| 47 | * @return int |
||
| 48 | */ |
||
| 49 | 6 | public function getLength() { |
|
| 52 | |||
| 53 | /** |
||
| 54 | * @param array $dataset |
||
| 55 | * |
||
| 56 | * @return $this |
||
| 57 | */ |
||
| 58 | 6 | public function setDataset(array $dataset = array()) { |
|
| 63 | |||
| 64 | /** |
||
| 65 | * @return mixed |
||
| 66 | */ |
||
| 67 | 6 | public function getDataset() { |
|
| 70 | |||
| 71 | /** |
||
| 72 | * @param $n |
||
| 73 | * @param int $total |
||
| 74 | * |
||
| 75 | * @return int |
||
| 76 | */ |
||
| 77 | 6 | protected function fact($n, $total = 1) { |
|
| 80 | |||
| 81 | } |