public function MatrixUtilityTest::findMaxSumSubmatrixProvider in Image Effects 8
Same name and namespace in other branches
- 8.3 tests/src/Unit/MatrixUtilityTest.php \Drupal\Tests\image_effects\Unit\MatrixUtilityTest::findMaxSumSubmatrixProvider()
- 8.2 tests/src/Unit/MatrixUtilityTest.php \Drupal\Tests\image_effects\Unit\MatrixUtilityTest::findMaxSumSubmatrixProvider()
Data provider for testFindMaxSumSubmatrix.
File
- tests/
src/ Unit/ MatrixUtilityTest.php, line 82
Class
- MatrixUtilityTest
- Tests the matrix utility helper methods.
Namespace
Drupal\Tests\image_effects\UnitCode
public function findMaxSumSubmatrixProvider() {
return [
'https://stackoverflow.com/questions/39937212/maximum-subarray-of-size-hxw-within-a-2d-matrix' => [
[
[
2,
6,
11,
17,
],
[
4,
11,
17,
27,
],
[
6,
13,
21,
32,
],
],
2,
2,
[
0,
2,
16,
],
],
// @codingStandardsIgnoreStart
'Balloons 800x600 image, 5x5 grid, 3x3 window, iteration 0' => [
[
[
7.149828007969111,
14.52693792247042,
20.727133160067577,
26.942425571557568,
33.14823014686185,
],
[
14.312453427577974,
29.096217924614514,
42.7882823815876,
56.29691369876961,
68.8985044700969,
],
[
20.935767108102084,
42.39019419048517,
63.16330952146982,
83.77903144175957,
103.21479024117907,
],
[
27.77644771283922,
56.54881486575256,
84.76991681179018,
112.84974270687856,
139.28567384335068,
],
[
34.61396461236888,
69.75423248892081,
103.69791757996403,
137.79049904400844,
172.0607021748857,
],
],
3,
3,
[
1,
1,
65.28069743045089,
],
],
'Balloons 800x600 image, 5x5 grid, 3x3 window, iteration 1' => [
[
[
7.395436748720447,
13.061548900268516,
19.759674075645936,
27.310109769326484,
32.94961687584198,
],
[
14.499929343417879,
25.649499984286866,
39.644946789665944,
54.539798303491395,
66.59695801328084,
],
[
20.60739681107713,
38.09231994008628,
57.91000095867883,
80.07381203314895,
98.67086129463216,
],
[
26.975800006736442,
50.778579908263275,
76.57225186604275,
104.24660526900689,
128.31525088111917,
],
[
34.15827241029355,
65.45350867389887,
98.75244152233243,
134.1220840130406,
165.9781620519868,
],
],
3,
3,
[
0,
2,
60.578541354545884,
],
],
];
}