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

Public Member Functions

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

Detailed Description

Class .

Test suite of the Γ combination.

Definition at line 50 of file Combination.php.

Member Function Documentation

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

Definition at line 52 of file Combination.php.

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

Definition at line 66 of file Combination.php.

67  {
68  $this
69  ->given(
70  $n = 2,
71  $k = 3,
72  $withoutZero = false
73  )
74  ->when($result = CUT::Γ($n, $k, $withoutZero))
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\Combination::case_n2_k3_without_zero ( )

Definition at line 106 of file Combination.php.

107  {
108  $this
109  ->given(
110  $n = 2,
111  $k = 3,
112  $withoutZero = true
113  )
114  ->when($result = CUT::Γ($n, $k, $withoutZero))
115  ->then
116  ->array($result)
117  ->isEqualTo([
118  [2, 1],
119  [1, 2]
120  ]);
121  }
Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Combination::case_n3_k2 ( )

Definition at line 85 of file Combination.php.

86  {
87  $this
88  ->given(
89  $n = 3,
90  $k = 2,
91  $withoutZero = false
92  )
93  ->when($result = CUT::Γ($n, $k, $withoutZero))
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  }
Hoa\Math\Test\Unit\Sampler\Combinatorics\Combination\Combination::case_n3_k2_without_zero ( )

Definition at line 123 of file Combination.php.

124  {
125  $this
126  ->given(
127  $n = 3,
128  $k = 2,
129  $withoutZero = true
130  )
131  ->when($result = CUT::Γ($n, $k, $withoutZero))
132  ->then
133  ->array($result)
134  ->isEmpty();
135  }

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