| @@ 206-213 (lines=8) @@ | ||
| 203 | * |
|
| 204 | * @return int |
|
| 205 | */ |
|
| 206 | public function rows($rows = null): int |
|
| 207 | { |
|
| 208 | if (isset($rows)) { |
|
| 209 | $this->config[Options::ROWS] = (int) $rows; |
|
| 210 | } |
|
| 211 | ||
| 212 | return $this->config[Options::ROWS]; |
|
| 213 | } |
|
| 214 | ||
| 215 | /** |
|
| 216 | * Set or get a seed for the random number generator. Use this for reproducable of runs. |
|
| @@ 222-229 (lines=8) @@ | ||
| 219 | * |
|
| 220 | * @return int |
|
| 221 | */ |
|
| 222 | public function seed($seed = null): int |
|
| 223 | { |
|
| 224 | if (isset($seed)) { |
|
| 225 | $this->config[Options::SEED] = (int) $seed; |
|
| 226 | } |
|
| 227 | ||
| 228 | return $this->config[Options::SEED]; |
|
| 229 | } |
|
| 230 | ||
| 231 | /** |
|
| 232 | * Set or get the number of states that are cycled through. |
|
| @@ 254-261 (lines=8) @@ | ||
| 251 | * |
|
| 252 | * @return int |
|
| 253 | */ |
|
| 254 | public function threshold($threshold = null): int |
|
| 255 | { |
|
| 256 | if (isset($threshold)) { |
|
| 257 | $this->config[Options::THRESHOLD] = (int) $threshold; |
|
| 258 | } |
|
| 259 | ||
| 260 | return $this->config[Options::THRESHOLD]; |
|
| 261 | } |
|
| 262 | ||
| 263 | public function toArray(): array |
|
| 264 | { |
|