@@ -34,17 +34,17 @@ SOFTWARE.
3434
3535namespace
3636{
37- std::array<char , 10 > input_c
37+ std::array<int8_t , 10 > input_c
3838 {
3939 0 , 1 , 2 , 3 , 4 , 5 , 6 , 7 , 8 , 9
4040 };
4141
42- std::array<char , 10 > input_c_flat
42+ std::array<int8_t , 10 > input_c_flat
4343 {
4444 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0 , 0
4545 };
4646
47- std::array<char , 10 > input_c_inv
47+ std::array<int8_t , 10 > input_c_inv
4848 {
4949 0 , -1 , -2 , -3 , -4 , -5 , -6 , -7 , -8 , -9
5050 };
@@ -120,21 +120,21 @@ namespace
120120 double covariance_result;
121121
122122 // Negative correlation.
123- etl::correlation<etl::correlation_type::Population, char , int32_t > correlation1 (input_c.begin (), input_c.end (), input_c_inv.begin ());
123+ etl::correlation<etl::correlation_type::Population, int8_t , int32_t > correlation1 (input_c.begin (), input_c.end (), input_c_inv.begin ());
124124 correlation_result = correlation1;
125125 CHECK_CLOSE (-1.0 , correlation_result, 0.1 );
126126 covariance_result = correlation1.get_covariance ();
127127 CHECK_CLOSE (-8.25 , covariance_result, 0.1 );
128128
129129 // Zero correlation
130- etl::correlation<etl::correlation_type::Population, char , int32_t > correlation2 (input_c.begin (), input_c.end (), input_c_flat.begin ());
130+ etl::correlation<etl::correlation_type::Population, int8_t , int32_t > correlation2 (input_c.begin (), input_c.end (), input_c_flat.begin ());
131131 correlation_result = correlation2;
132132 CHECK_CLOSE (0.0 , correlation_result, 0.1 );
133133 covariance_result = correlation2.get_covariance ();
134134 CHECK_CLOSE (0.0 , covariance_result, 0.1 );
135135
136136 // Positive correlation.
137- etl::correlation<etl::correlation_type::Population, char , int32_t > correlation3 (input_c.begin (), input_c.end (), input_c.begin ());
137+ etl::correlation<etl::correlation_type::Population, int8_t , int32_t > correlation3 (input_c.begin (), input_c.end (), input_c.begin ());
138138 correlation_result = correlation3;
139139 CHECK_CLOSE (1.0 , correlation_result, 0.1 );
140140 covariance_result = correlation3.get_covariance ();
@@ -148,21 +148,21 @@ namespace
148148 double covariance_result;
149149
150150 // Negative correlation.
151- etl::correlation<etl::correlation_type::Sample, char , int32_t > correlation1 (input_c.begin (), input_c.end (), input_c_inv.begin ());
151+ etl::correlation<etl::correlation_type::Sample, int8_t , int32_t > correlation1 (input_c.begin (), input_c.end (), input_c_inv.begin ());
152152 correlation_result = correlation1;
153153 CHECK_CLOSE (-1.0 , correlation_result, 0.1 );
154154 covariance_result = correlation1.get_covariance ();
155155 CHECK_CLOSE (-9.17 , covariance_result, 0.1 );
156156
157157 // Zero correlation
158- etl::correlation<etl::correlation_type::Sample, char , int32_t > correlation2 (input_c.begin (), input_c.end (), input_c_flat.begin ());
158+ etl::correlation<etl::correlation_type::Sample, int8_t , int32_t > correlation2 (input_c.begin (), input_c.end (), input_c_flat.begin ());
159159 correlation_result = correlation2;
160160 CHECK_CLOSE (0.0 , correlation_result, 0.1 );
161161 covariance_result = correlation2.get_covariance ();
162162 CHECK_CLOSE (0.0 , covariance_result, 0.1 );
163163
164164 // Positive correlation.
165- etl::correlation<etl::correlation_type::Sample, char , int32_t > correlation3 (input_c.begin (), input_c.end (), input_c.begin ());
165+ etl::correlation<etl::correlation_type::Sample, int8_t , int32_t > correlation3 (input_c.begin (), input_c.end (), input_c.begin ());
166166 correlation_result = correlation3;
167167 CHECK_CLOSE (1.0 , correlation_result, 0.1 );
168168 covariance_result = correlation3.get_covariance ();
0 commit comments