Branch Coverage

blib/lib/Algorithm/SetSimilarity/Jaccard.pm
Criterion Covered Total %
branch 61 72 84.7


line true false branch
14 0 9 if exists $$param{'is_sorted'}
15 2 7 if exists $$param{'data_type'}
24 2 4 if (&Scalar::Util::looks_like_number($$set1[0]))
27 2 4 if (&Scalar::Util::looks_like_number($$set2[0]))
31 4 2 if ($type1 eq $type2)
41 18 3 if (ref $set1 eq 'ARRAY' and ref $set2 eq 'ARRAY' and @$set1 and @$set2)
42 10 8 if (defined $threshold and $threshold > 0) { }
48 1 7 unless exists $$self{'data_type'}
49 8 0 if ($is_estimate or exists $$self{'data_type'})
50 8 0 unless ($$self{'is_sorted'})
51 2 6 if ($$self{'data_type'} eq 'number') { }
62 25 20 if ($$self{'data_type'} eq 'number') { }
68 13 32 if ($judge == -1) { }
8 24 elsif ($judge == 1) { }
88 1 1 if ($#$set1 > $#$set2)
93 2 0 wantarray ? :
98 1 63 if ($#$set1 < $#$set2)
103 64 0 wantarray ? :
109 54 1 if (ref $set1 eq 'ARRAY' and ref $set2 eq 'ARRAY' and @$set1 and @$set2 and $threshold > 0 and $threshold <= 1)
118 0 54 unless $s1 * $threshold <= $s2
120 1 53 unless exists $$self{'data_type'}
121 54 0 if ($is_estimate or exists $$self{'data_type'})
122 54 0 unless ($$self{'is_sorted'})
123 4 50 if ($$self{'data_type'} eq 'number') { }
139 31 96 if ($$self{'data_type'} eq 'number') { }
145 30 97 if ($judge == -1) { }
22 75 elsif ($judge == 1) { }
156 9 45 if $min > $s1 - $att1
157 0 54 if ($match_num + $min < $min_overlap)
162 1 53 unless $match_num >= 1
165 9 54 if ($$self{'data_type'} eq 'number') { }
171 5 58 if ($judge == -1) { }
8 50 elsif ($judge == 1) { }
172 0 5 if $match_num + ($s1 - $att1) < $min_overlap
175 0 8 if $match_num + ($s2 - $att2) < $min_overlap
183 9 44 unless $match_num >= $min_overlap + 1