blib/lib/App/RecordStream/Aggregator/Internal/Ord2UnivariateMap.pm

filter: Statementstmt 77.7% 14 / 18 Branchbran n/a Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 0.0% 0 / 1 totaltotal 75.0% 18 / 24 CC 1 SCAR 1.8
CC
1
Cov
78%
squish
2.0
BEGIN
1.0
BEGIN
1.0
CRAP 1.2
« blib/lib/App/RecordStream/Aggregator/Internal/Ord2BivariateMap.pm ↑ Summary blib/lib/App/RecordStream/Operation/eval.pm »
1 package App::RecordStream::Aggregator::Internal::Ord2UnivariateMap;
2  
3 6 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
4 6 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
5  
6 6 ▶use App::RecordStream::Aggregator::Ord2Univariate;
Subroutine BEGIN: called CC=1 SCAR=0.0
7  
8 6 ▶use base 'App::RecordStream::Aggregator::Ord2Univariate';
Subroutine BEGIN: called CC=1 SCAR=0.0
9  
10 #sub new -- passed through
11  
12 #sub new_from_valuation -- passed through
13  
14 sub squish
15 {
16 0 ▶ my ($this, $cookie) = @_;
Subroutine squish: not called CC=1 SCAR=6.9
Pod undocumented
17  
18 0 my ($sum1, $sumx, $sumx2) = @$cookie;
19  
20 0 my $var = ($sumx2 / $sum1) - ($sumx / $sum1) ** 2;
21 return
22 {
23 0 'ct' => $sum1,
24  
25 'sum' => $sumx,
26 'avg' => $sumx / $sum1,
27  
28 'sum2' => $sumx2,
29 'avg2' => $sumx2 / $sum1,
30 'var' => $var,
31 'stddev' => sqrt($var),
32 };
33 }
34  
35 6 App::RecordStream::DomainLanguage::Registry::register_vfn(__PACKAGE__, 'new_from_valuation', 'ord2map', 'VALUATION');
36  
37 6 1;
« blib/lib/App/RecordStream/Aggregator/Internal/Ord2BivariateMap.pm ↑ Summary blib/lib/App/RecordStream/Operation/eval.pm »