| 111 | } |
| 112 | |
| 113 | bool IsMatrix(BitMatrix *mat) { |
| 114 | if (mat->len() != 0 && mat->at(0)->len() == 0) |
| 115 | return false; |
| 116 | for (Int i = 1; i < mat->len(); i++) { |
| 117 | if (mat->at(i - 1)->len() != mat->at(i)->len()) { |
| 118 | return false; |
| 119 | } |
| 120 | } |
| 121 | return true; |
| 122 | } |
| 123 | |
| 124 | BitMatrix *Transpose(BitMatrix *mat) { |
| 125 | require(IsMatrix(mat), "not a proper matrix"); |
no test coverage detected