Branch Coverage

blib/lib/Statistics/Discrete.pm
Criterion Covered Total %
branch 19 142 13.3


line true false branch
72 4 6 if (defined $self->{'data_frequency'}{$data}) { }
91 0 0 unless open $f, '<', $filename
94 0 0 if ($line =~ /^\s*#/u)
98 0 0 if (scalar @cols == 1)
99 0 0 if (defined $self->{'data_frequency'}{$cols[0]}) { }
106 0 0 if (scalar @cols == 2)
107 0 0 if (defined $self->{'data_frequency'}{$cols[1]}) { }
115 0 0 if (scalar @cols != 1 and scalar @cols != 2)
136 0 0 unless open $f, '<', $filename
139 0 0 if ($line =~ /^\s*#/u)
144 0 0 if (scalar @cols == 2)
145 0 0 if (defined $self->{'data_frequency'}{$cols[0]}) { }
154 0 0 if (scalar @cols != 2)
176 1 0 unless (defined $self->{'stats'}{'Desc'}{'min'})
178 1 0 if ($count > 0) { }
193 1 0 unless (defined $self->{'stats'}{'Desc'}{'max'})
195 1 0 if ($count > 0) { }
210 1 5 unless (defined $self->{'stats'}{'Desc'}{'count'})
227 1 1 unless (defined $self->{'stats'}{'Desc'}{'mean'})
234 1 0 if ($count > 0) { }
252 1 0 unless (defined $self->{'stats'}{'Desc'}{'median'})
255 0 1 if ($count % 2 != 0)
265 1 9 if ($current_index == $median_index)
268 1 9 if ($current_index == $median_index + 1 and $odd == 0)
295 0 0 if ($cdf->{$v} > $max_probability)
313 1 0 unless (defined $self->{'stats'}{'Desc'}{'variance'})
322 1 0 if ($count > 0)
336 0 0 unless (defined $self->{'stats'}{'Desc'}{'sdev'})
353 0 0 if ($self->count == 0)
357 0 0 if ($self->{'bin-type'} == 0) { }
374 0 0 if ($self->count == 0)
378 0 0 if ($self->{'bin-type'} == 0) { }
396 0 0 if ($self->count == 0)
400 0 0 if ($self->{'bin-type'} == 0) { }
415 0 0 if ($self->count == 0)
419 0 0 if ($self->{'bin-type'} == 0) { }
436 0 0 unless (defined $self->{'stats'}{'Dist'}{'frequency'})
445 0 0 unless (defined $self->{'stats'}{'Dist'}{'pmf'})
460 0 0 unless (defined $self->{'stats'}{'Dist'}{'cdf'})
477 0 0 unless (defined $self->{'stats'}{'Dist'}{'ccdf'})
497 0 0 unless (defined $self->{'stats'}{'Dist'}{'binned'}{'frequency'})
513 0 0 if ($sorted_vals[$i] < $self->{'bins'}{$sorted_bins[$bi]}{'right'}) { }
525 0 0 if ($i == $num_vals)
537 0 0 unless (defined $self->{'stats'}{'Dist'}{'binned'}{'pmf'})
545 0 0 if ($interval > 0) { }
559 0 0 unless (defined $self->{'stats'}{'Dist'}{'binned'}{'cdf'})
574 0 0 unless (defined $self->{'stats'}{'Dist'}{'binned'}{'ccdf'})
596 0 0 if ($bin_type != 0 and $bin_type != 1 and $bin_type != 2)
601 0 0 if ($bin_type == $self->{'bin-type'})
614 0 0 if ($self->{'optimal-binning'} == 0)
626 0 0 if ($self->{'bin-type'} == 0)
629 0 0 if ($nb < 2)
633 0 0 if ($self->{'optimal-binning'} == 0 and defined $self->{'num-bins'} and $self->{'num-bins'} == $nb) { }
650 0 0 if ($self->count == 0)
655 0 0 unless (defined $self->{'bins'})
658 0 0 if ($self->{'bin-type'} == 0)
672 0 0 if ($self->{'optimal-binning'} == 0) { }
673 0 0 if ($self->{'bin-type'} == 1)
676 0 0 if ($self->{'bin-type'} == 2)
684 0 0 if ($res != 0)
722 0 0 if ($max_num_bins == 1)
727 0 0 if ($s_min > 1 or $s_max < 1)
735 0 0 if ($s_avg < 1) { }
745 0 0 if (1 - $s_min < $s_max - 1) { }
770 0 0 if ($self->{'bin-type'} == 1)
773 0 0 if ($self->{'bin-type'} == 2)
794 0 0 if ($sorted_support[$s] < $cur_bins->{$ref}{'right'}) { }
800 0 0 if ($interval > 0) { }
813 0 0 if ($s == $sup_size)
815 0 0 if ($interval > 0) { }
874 0 0 if ($min == 0 or $max == 0 or $min * $max < 0)