Graph/SPTHeapElem.pm

filter: Statementstmt 100% 14 / 14 Branchbran 75.0% 3 / 4 Conditioncond 71.4% 5 / 7 MC/DCmcdc 0.0% 0 / 3 Subroutinesub 100% 6 / 6 Podpod 0.0% 0 / 4 totaltotal 73.6% 28 / 38 CC 6 SCAR 11.3
CC
6
Cov
88%
cmp
5.2
heap
2.1
BEGIN
1.0
CRAP 3.1
« Graph/BitMatrix.pm ↑ Summary Graph/Attribute.pm »
1 package Graph::SPTHeapElem;
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 1035 ▶sub new {
Subroutine new: called CC=1 SCAR=0.0
Pod undocumented
7 1035 my $class = shift;
8 1035 bless { u => $_[0], v => $_[1], w => $_[2] }, $class;
9 }
10  
11 2070 ▶sub heap {
Subroutine heap: called CC=2 SCAR=7.2
Pod undocumented
12 2070 my $self = shift;
13 2070 ▶ @_ ? ($self->{heap} = shift) : $self->{heap};
Branch: 1 branch
BranchTrueFalseTotal
@_ ? : 2070 0 2070
14 }
15  
16 6230 ▶sub cmp {
Subroutine cmp: called CC=5 SCAR=16.5
Pod undocumented
17 ($_[0]->{ w } || 0) <=> ($_[1]->{ w } || 0) ||
18 ($_[0]->{ u } cmp $_[1]->{ u }) ||
19 6230 ▶ ($_[0]->{ u } cmp $_[1]->{ v });
Branch: 1 branch
BranchTrueFalseTotal
($_[0]{"w"} || 0) <=> ($_[1]{"w"} || 0) or $_[0]{"u"} cmp $_[1]{"u"} or $_[0]{"u"} cmp $_[1]{"v"} 3514 2716 6230
Condition71%5/7
($_[0]{"w"} || 0) <=> ($_[1]{"w"} || 0) or $_[0]{"u"} cmp $_[1]{"u"}
l!l&&r!l&&!r
151320012716
$_[0]{'w'} || 0
l!l
62300
$_[1]{'w'} || 0
l!l
62300
MC/DC0%0/2
($_[0]{"w"} || 0) <=> ($_[1]{"w"} || 0) or $_[0]{"u"} cmp $_[1]{"u"}
$_[0]{'w'} $_[0]{"u"} cmp $_[1]{"u"}
MC/DC0%0/1
$_[1]{'w'} || 0
$_[1]{'w'}
Truth table33%1/3
A or B
A= $_[0]{'w'}B= $_[0]{"u"} cmp $_[1]{"u"}
ABresult
1X1
011
000
Truth table50%1/2
A
A= $_[1]{'w'}
Aresult
11
00
20 }
21  
22 1035 ▶sub val {
Subroutine val: called CC=1 SCAR=0.0
Pod undocumented
23 1035 @{ $_[0] }{ qw(u v w) };
24 }
25  
26 6 1;
« Graph/BitMatrix.pm ↑ Summary Graph/Attribute.pm »