Branch Coverage

lib/Math/FastGF2/Matrix.pm
Criterion Covered Total %
branch 116 228 50.8


line true false branch
50 0 174 unless (defined $o{$_})
56 58 0 if (defined $o{'org'}) { }
57 51 7 if ($o{'org'} eq 'rowwise') { }
7 0 elsif ($o{'org'} eq 'colwise') { }
72 0 44 if ($o{'width'} != 1 and $o{'width'} != 2 and $o{'width'} != 4)
77 0 58 if $errors
93 0 445 unless (defined $o{'size'} and $o{'size'} > 0)
97 0 26 unless (defined $o{'width'} and $o{'width'} == 1 || $o{'width'} == 2 || $o{'width'} == 4)
102 0 445 unless (defined $o{'org'} and $o{'org'} eq 'rowwise' || $o{'org'} == 'colwise')
107 445 0 $o{'org'} eq 'rowwise' ? :
110 0 445 unless $id
129 0 14 unless (defined $other and ref $other eq $class)
133 0 14 unless ($self->COLS == $other->ROWS)
137 0 14 unless ($self->WIDTH == $other->WIDTH)
142 1 13 if (defined $result) { }
143 0 1 unless (ref $result eq $class)
147 0 1 unless ($self->ROWS == $result->ROWS)
151 0 1 unless ($self->WIDTH == $result->WIDTH)
158 0 13 unless (defined $result and ref $result eq $class)
175 0 259 unless (defined $other and ref $other eq $class)
179 0 259 unless ($self->COLS == $other->COLS)
182 0 259 unless ($self->COLS == $other->COLS)
185 0 259 unless ($self->WIDTH == $other->WIDTH)
197 0 212 unless (defined $other and ref $other eq $class)
201 1 211 if ($self->COLS != $other->COLS)
204 0 211 if ($self->COLS != $other->COLS)
207 0 211 if ($self->WIDTH != $other->WIDTH)
222 0 12 if (int $offset != $offset)
226 0 12 if ($offset < 0 or $offset >= $ROWS * $COLS)
230 4 8 if (1 == $self->ORGNUM) { }
245 0 12 if ($row < 0 or $row >= $self->ROWS)
249 0 12 if ($col < 0 or $col >= $self->COLS)
253 4 8 if ($self->ORG eq 'rowwise') { }
273 0 696 unless ($class)
281 0 696 unless (defined $row and defined $col and defined $words)
285 0 696 if ($order < 0 or $order > 2)
291 0 696 if ($row < 0 or $row >= $ROWS)
295 0 696 if ($col < 0 or $row >= $ROWS)
302 687 9 unless $want_list
305 1 8 if ($WIDTH == 1) { }
4 4 elsif ($WIDTH == 2) { }
322 685 13 unless defined $order
328 0 698 unless ($class)
332 0 698 unless (defined $row and defined $col)
336 0 698 if ($order < 0 or $order > 2)
340 0 698 if ($row < 0 or $row >= $ROWS)
344 0 698 if ($col < 0 or $row >= $ROWS)
349 18 680 if (ref $vals) { }
351 0 18 unless ($words = scalar @$vals)
355 4 14 if ($WIDTH == 1) { }
11 3 elsif ($WIDTH == 2) { }
369 0 698 if (1 == $self->ORGNUM and $words + $COLS * $row + $col > $msize or $words + $ROWS * $col + $row > $msize)
387 0 440 unless (defined $other and ref $other eq $class)
391 0 440 unless ($self->WIDTH == $other->WIDTH)
395 0 440 unless ($self->ROWS == $other->ROWS)
402 0 440 unless defined $cat
403 440 0 if ($self->ORG eq 'rowwise') { }
431 0 90 if $row1 == $row2
432 0 90 unless defined $start_col
437 90 0 if ($self->ORG eq 'rowwise') { }
458 0 0 if $col1 == $col2
459 0 0 unless defined $start_row
464 0 0 if ($self->ORG eq 'colwise') { }
494 0 440 unless ($cols > $rows)
507 90 1260 if ($self->getval($row, $row) == 0)
511 0 90 if $row == $other_row
512 90 0 if ($self->getval($other_row, $row) != 0)
517 0 90 unless defined $found
532 1350 2860 if $row == $other_row
535 382 2478 if $other == 0
564 0 440 unless ($self->COLS == $self->ROWS)
572 0 440 unless defined $cat
611 0 0 if (defined $o{'xyvals'}) { }
613 0 0 if defined $xvals
614 0 0 if defined $yvals
616 0 0 if (defined $rows and not defined $cols) { }
0 0 elsif (defined $cols and not defined $rows) { }
635 0 0 if defined $xvals and not defined $rows
636 0 0 if defined $yvals and not defined $cols
639 0 0 unless defined $xvals and defined $yvals
641 0 0 unless @$xvals == $rows
642 0 0 unless @$yvals == $cols
643 0 0 unless $rows >= $cols
651 0 0 unless ref $self
703 0 0 unless defined $o{'xvals'}
712 0 0 if @x - @y
713 0 0 if @$key < 2 * $k
714 0 0 if @x != $k
718 0 0 unless ref $self
726 0 0 if ($n < 3) { }
815 0 1 unless ref $xvals eq 'ARRAY'
816 0 1 unless defined $cols and $cols > 0
822 0 1 unless ref $self
880 3 221 if (defined $submatrix) { }
217 4 elsif (defined $rows or defined $cols) { }
881 0 3 if (defined $rows or defined $cols)
886 0 3 unless (defined $row1 and defined $col1 and defined $row2 and defined $col2)
892 0 3 unless ($row1 >= 0 and $row1 <= $row2 and $row2 < $self->ROWS and $col1 >= 0 and $col1 <= $col2 and $col2 < $self->COLS)
900 3 0 if ($self->ORG eq 'rowwise') { }
917 0 217 if (defined $rows and not ref $rows)
921 0 217 if (defined $cols and not ref $cols)
926 2 215 if (defined $rows and defined $cols) { }
212 3 elsif (defined $rows and $self->ORG eq 'rowwise') { }
0 3 elsif (defined $cols and $self->ORG eq 'colwise') { }
969 3 0 unless defined $rows
970 0 3 unless defined $cols
992 0 4 unless defined $mat
1027 3 3 if ($o{'org'} ne $self->ORG) { }
1035 3 3 if ($transpose) { }
2 1 elsif ($fliporg) { }
1039 0 3 unless defined $mat
1040 1 2 if ($fliporg) { }
1056 0 2 unless defined $mat
1080 1 0 if ($self->ORG eq 'rowwise') { }