| 135 | starts->InsertText(partition, -1); |
| 136 | } |
| 137 | void Check() const { |
| 138 | if (Length() < 0) { |
| 139 | throw std::runtime_error("SparseVector: Length can not be negative."); |
| 140 | } |
| 141 | if (starts->Partitions() < 1) { |
| 142 | throw std::runtime_error("SparseVector: Must always have 1 or more partitions."); |
| 143 | } |
| 144 | if (starts->Partitions() != values->Length() - 1) { |
| 145 | throw std::runtime_error("SparseVector: Partitions and values different lengths."); |
| 146 | } |
| 147 | // The final element can not be set |
| 148 | if (values->ValueAt(values->Length() - 1) != T()) { |
| 149 | throw std::runtime_error("SparseVector: Unused style at end changed."); |
| 150 | } |
| 151 | } |
| 152 | }; |
| 153 | |
| 154 | } |
nothing calls this directly
no test coverage detected