Commit c495d065190f6da988926de023e63fa81752a463
1 parent
1c92dffe
Fixed stim::matrix CSV output bug.
Showing
1 changed file
with
2 additions
and
2 deletions
Show diff stats
stim/math/matrix.h
... | ... | @@ -189,9 +189,9 @@ public: |
189 | 189 | |
190 | 190 | std::string csv() { |
191 | 191 | std::stringstream csvss; |
192 | - for (size_t i = 0; i < B; i++) { | |
192 | + for (size_t i = 0; i < R; i++) { | |
193 | 193 | csvss << M[i]; |
194 | - for (size_t j = 0; j < B; j++) csvss << ", " << M[j * B + i]; | |
194 | + for (size_t j = 0; j < C; j++) csvss << ", " << M[j * R + i]; | |
195 | 195 | csvss << std::endl; |
196 | 196 | } |
197 | 197 | return csvss.str(); | ... | ... |