Hoa central
Public Member Functions | List of all members
Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Gamma Class Reference
Inheritance diagram for Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Gamma:

Public Member Functions

 case_empty ()
 
 case_n2_k3 ()
 
 case_n3_k2 ()
 
- Public Member Functions inherited from Hoa\Test\Unit\Suite
 __construct ()
 
 getTestedClassName ()
 
 getTestedClassNamespace ()
 
 beforeTestMethod ($methodName)
 

Detailed Description

Class .

Test suite of the Γ iterator.

Definition at line 50 of file Gamma.php.

Member Function Documentation

Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Gamma::case_empty ( )

Definition at line 52 of file Gamma.php.

53  {
54  $this
55  ->given(
56  $n = 0,
57  $k = 0,
58  $iterator = new CUT($n, $k)
59  )
60  ->when($result = iterator_to_array($iterator))
61  ->then
62  ->array($result)
63  ->isEmpty();
64  }
Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Gamma::case_n2_k3 ( )

Definition at line 66 of file Gamma.php.

67  {
68  $this
69  ->given(
70  $n = 2,
71  $k = 3,
72  $iterator = new CUT($n, $k)
73  )
74  ->when($result = iterator_to_array($iterator))
75  ->then
76  ->array($result)
77  ->isEqualTo([
78  [3, 0],
79  [2, 1],
80  [1, 2],
81  [0, 3]
82  ]);
83  }
Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Gamma::case_n3_k2 ( )

Definition at line 85 of file Gamma.php.

86  {
87  $this
88  ->given(
89  $n = 3,
90  $k = 2,
91  $iterator = new CUT($n, $k)
92  )
93  ->when($result = iterator_to_array($iterator))
94  ->then
95  ->array($result)
96  ->isEqualTo([
97  [2, 0, 0],
98  [1, 1, 0],
99  [1, 0, 1],
100  [0, 2, 0],
101  [0, 1, 1],
102  [0, 0, 2]
103  ]);
104  }

The documentation for this class was generated from the following file: