blib/lib/App/RecordStream/Aggregator/Ord2Bivariate.pm

filter: Statementstmt 92.0% 23 / 25 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 77.7% 7 / 9 Podpod 0.0% 0 / 4 totaltotal 78.9% 30 / 38 CC 1 SCAR 2.0
CC
1
Cov
92%
squish
2.0
argct
2.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/RecordStream/Clumper/Key/WrappedCallback.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/InjectInto/Field.pm »
1 package App::RecordStream::Aggregator::Ord2Bivariate;
2  
3 9 our $VERSION = "4.0.23";
4  
5 9 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
6 9 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 9 ▶use App::RecordStream::Aggregator::MapReduce::FieldSet;
Subroutine BEGIN: called CC=1 SCAR=0.0
9 9 ▶use App::RecordStream::Aggregator;
Subroutine BEGIN: called CC=1 SCAR=0.0
10  
11 9 ▶use base 'App::RecordStream::Aggregator::MapReduce::FieldSet';
Subroutine BEGIN: called CC=1 SCAR=0.0
12  
13 #sub new -- passed through
14  
15 #sub new_from_valuation -- passed through
16  
17 sub map_fields
18 {
19 85 ▶ my ($this, $x, $y) = @_;
Subroutine map_fields: called CC=1 SCAR=0.0
Pod undocumented
20  
21 85 return [1,
22 $x,
23 $y,
24 $x * $y,
25 $x * $x,
26 $y * $y];
27 }
28  
29 sub reduce
30 {
31 72 ▶ my ($this, $cookie, $cookie2) = @_;
Subroutine reduce: called CC=1 SCAR=0.0
Pod undocumented
32  
33 72 my ($sum1_1, $sumx_1, $sumy_1, $sumxy_1, $sumx2_1, $sumy2_1) = @$cookie;
34 72 my ($sum1_2, $sumx_2, $sumy_2, $sumxy_2, $sumx2_2, $sumy2_2) = @$cookie2;
35  
36 72 return [$sum1_1 + $sum1_2,
37 $sumx_1 + $sumx_2,
38 $sumy_1 + $sumy_2,
39 $sumxy_1 + $sumxy_2,
40 $sumx2_1 + $sumx2_2,
41 $sumy2_1 + $sumy2_2];
42 }
43  
44 sub squish
45 {
46 0 ▶ die "Ord2Bivariate subclass doesn't implement squish\n";
Subroutine squish: not called CC=1 SCAR=6.9
Pod undocumented
47 }
48  
49 sub argct
50 {
51 0 ▶ return 2;
Subroutine argct: not called CC=1 SCAR=6.9
Pod undocumented
52 }
53  
54 9 1;
« blib/lib/App/RecordStream/Clumper/Key/WrappedCallback.pm ↑ Summary blib/lib/App/RecordStream/Aggregator/InjectInto/Field.pm »