Branch Coverage

blib/lib/Math/FastGF2/Matrix.pm
Criterion Covered Total %
branch 106 186 56.9


line true false branch
43 0 171 unless (defined $o{$_})
49 57 0 if (defined $o{'org'}) { }
50 50 7 if ($o{'org'} eq 'rowwise') { }
7 0 elsif ($o{'org'} eq 'colwise') { }
65 0 44 if ($o{'width'} != 1 and $o{'width'} != 2 and $o{'width'} != 4)
70 0 57 if $errors
88 0 27 unless (defined $o{'size'} and $o{'size'} > 0)
92 0 26 unless (defined $o{'width'} and $o{'width'} == 1 || $o{'width'} == 2 || $o{'width'} == 4)
97 0 27 unless (defined $o{'org'} and $o{'org'} eq 'rowwise' || $o{'org'} == 'colwise')
102 27 0 $o{'org'} eq 'rowwise' ? :
105 0 27 unless $id
124 0 14 unless (defined $other and ref $other eq $class)
128 0 14 unless ($self->COLS == $other->ROWS)
132 0 14 unless ($self->WIDTH == $other->WIDTH)
137 1 13 if (defined $result) { }
138 0 1 unless (ref $result eq $class)
142 0 1 unless ($self->ROWS == $result->ROWS)
146 0 1 unless ($self->WIDTH == $result->WIDTH)
153 0 13 unless (defined $result and ref $result eq $class)
170 0 50 unless (defined $other and ref $other eq $class)
174 0 50 unless ($self->COLS == $other->COLS)
177 0 50 unless ($self->COLS == $other->COLS)
180 0 50 unless ($self->WIDTH == $other->WIDTH)
192 0 3 unless (defined $other and ref $other eq $class)
196 1 2 if ($self->COLS != $other->COLS)
199 0 2 if ($self->COLS != $other->COLS)
202 0 2 if ($self->WIDTH != $other->WIDTH)
212 0 12 if ($offset % $self->WIDTH)
217 0 12 if ($offset < 0 or $offset >= $self->ROWS * $self->COLS)
221 4 8 if ($self->ORG eq 'rowwise') { }
235 0 12 if ($row < 0 or $row >= $self->ROWS)
239 0 12 if ($col < 0 or $col >= $self->COLS)
243 4 8 if ($self->ORG eq 'rowwise') { }
261 0 69 unless ($class)
269 0 69 unless (defined $row and defined $col and defined $words)
273 0 69 if ($order < 0 or $order > 2)
279 0 69 if ($row < 0 or $row >= $self->ROWS)
283 0 69 if ($col < 0 or $row >= $self->ROWS)
290 60 9 unless $want_list
293 1 8 if ($self->WIDTH == 1) { }
4 4 elsif ($self->WIDTH == 2) { }
310 58 13 unless defined $order
314 0 71 unless ($class)
318 0 71 unless (defined $row and defined $col)
322 0 71 if ($order < 0 or $order > 2)
326 0 71 if ($row < 0 or $row >= $self->ROWS)
330 0 71 if ($col < 0 or $row >= $self->ROWS)
335 18 53 if (ref $vals) { }
337 0 18 unless ($words = scalar @$vals)
341 4 14 if ($self->WIDTH == 1) { }
11 3 elsif ($self->WIDTH == 2) { }
355 0 71 if ($self->ORG eq 'rowwise' and $words + $self->COLS * $row + $col > $msize or $words + $self->ROWS * $col + $row > $msize)
373 0 22 unless (defined $other and ref $other eq $class)
377 0 22 unless ($self->WIDTH == $other->WIDTH)
381 0 22 unless ($self->ROWS == $other->ROWS)
388 0 22 unless defined $cat
389 22 0 if ($self->ORG eq 'rowwise') { }
417 0 0 if $row1 == $row2
418 0 0 unless defined $start_col
423 0 0 if ($self->ORG eq 'rowwise') { }
444 0 0 if $col1 == $col2
445 0 0 unless defined $start_row
450 0 0 if ($self->ORG eq 'colwise') { }
480 0 22 unless ($cols > $rows)
493 0 96 if ($self->getval($row, $row) == 0)
497 0 0 if $row == $other_row
498 0 0 if ($self->getval($other_row, $row) != 0)
503 0 0 unless defined $found
518 96 352 if $row == $other_row
521 112 240 if $other == 0
550 0 22 unless ($self->COLS == $self->ROWS)
558 0 22 unless defined $cat
593 3 12 if (defined $submatrix) { }
8 4 elsif (defined $rows or defined $cols) { }
594 0 3 if (defined $rows or defined $cols)
599 0 3 unless (defined $row1 and defined $col1 and defined $row2 and defined $col2)
605 0 3 unless ($row1 >= 0 and $row1 <= $row2 and $row2 < $self->ROWS and $col1 >= 0 and $col1 <= $col2 and $col2 < $self->COLS)
613 3 0 if ($self->ORG eq 'rowwise') { }
630 0 8 if (defined $rows and not ref $rows)
634 0 8 if (defined $cols and not ref $cols)
639 2 6 if (defined $rows and defined $cols) { }
3 3 elsif (defined $rows and $self->ORG eq 'rowwise') { }
0 3 elsif (defined $cols and $self->ORG eq 'colwise') { }
682 3 0 unless defined $rows
683 0 3 unless defined $cols
705 0 4 unless defined $mat
740 3 3 if ($o{'org'} ne $self->ORG) { }
748 3 3 if ($transpose) { }
2 1 elsif ($fliporg) { }
752 0 3 unless defined $mat
753 1 2 if ($fliporg) { }
769 0 2 unless defined $mat
793 1 0 if ($self->ORG eq 'rowwise') { }