Branch Coverage

blib/lib/Cluster/Similarity.pm
Criterion Covered Total %
branch 62 104 59.6


line true false branch
134 0 32 unless $dataset_ref
138 32 0 if (ref $dataset_ref eq 'ARRAY') { }
0 0 elsif (ref $dataset_ref eq 'HASH') { }
174 0 29 if ($n < 0)
276 0 3 unless $classification1_of{$id} and $classification2_of{$id}
278 0 3 if ($objects_of{$id})
301 0 1 unless $classification1_of{$id} and $classification2_of{$id}
303 1 0 if ($object_nbr_of{$id})
367 0 14 unless $classification1_of{$id} and $classification2_of{$id}
369 3 11 if (exists $contingency_of{$id} and $contingency_of{$id})
408 0 3 unless $classification1_of{$id} and $classification2_of{$id}
410 0 3 if (exists $pairs_contingency_of{$id} and $pairs_contingency_of{$id})
442 0 7 unless $classification1_of{$id} and $classification2_of{$id}
444 4 3 if (exists $tp_of{$id})
460 16 26 if exists $$_{$val1}
461 12 4 if ($is_in_2)
484 0 4 unless $classification1_of{$id}
486 1 3 if ($pairs_classification_1_of{$id})
504 0 4 unless $classification2_of{$id}
506 1 3 if ($pairs_classification_2_of{$id})
536 3 3 if ($pair_wise_recall_of{$id})
544 0 3 if (not defined $pairs or $pairs == 0)
560 3 3 if ($pair_wise_precision_of{$id})
567 0 3 if (not defined $pairs or $pairs == 0)
583 0 3 if ($pair_wise_fscore_of{$id})
592 3 0 if ($prec and $recall)
612 0 3 unless $classification1_of{$id} and $classification2_of{$id}
614 0 3 if ($mutual_information_of{$id})
629 8 0 if (exists $$contingency{$cluster})
634 19 0 if exists $$contingency{$_}
647 10 9 unless $$contingency{$i}{$j}
675 0 2 unless $classification1_of{$id} and $classification2_of{$id}
677 0 2 if ($rand_index_of{$id})
712 30 0 if (exists $objects_by_class{$o1}[0] and exists $objects_by_class{$o2}[0])
722 30 0 if (exists $objects_by_class{$o1}[1] and exists $objects_by_class{$o2}[1])
728 12 0 if $pair_in_class2{$_}
731 8 4 if (exists $pair_in_class2{$cluster})
739 22 0 if (exists $objects_by_class{$o1}[0] and exists $objects_by_class{$o1}[1])
744 16 2 unless (exists $objects_by_class{$o2}[0] and exists $objects_by_class{$o2}[0]{$cluster1} or exists $objects_by_class{$o2}[1] and exists $objects_by_class{$o2}[1]{$cluster2})
753 6 0 if (exists $objects_by_class{$o2}[0] and exists $objects_by_class{$o2}[1])
757 6 0 if my $o1_in_1 = exists $objects_by_class{$o1}[0]
758 6 0 if my $o1_in_2 = exists $objects_by_class{$o1}[1]
759 0 0 unless ($o1_in_1 or $o1_in_2)
771 2 0 if ($n > 1) { }
801 0 2 unless $classification1_of{$id} and $classification2_of{$id}
803 0 2 if ($rand_index_adj_of{$id})
838 2 0 if ($n > 1)
846 2 0 if ($max_index != $exp_index)
866 0 3 unless $classification1_of{$id} and $classification2_of{$id}
868 0 3 if ($matching_index_of{$id})
892 12 7 if (exists $col_sums{$col_cl}) { }
914 3 0 if ($PkQk > 0)