Kronecker product based fractals: Difference between revisions
m
Minor edit to C++ code
(C++ - added links to output images) |
m (Minor edit to C++ code) |
||
Line 314:
for (const auto& row : values) {
assert(row.size() <= columns_);
std::copy(begin(row), end(row),
}
}
size_t rows() const { return rows_; }
size_t columns() const { return columns_; }
const scalar_type
assert(row < rows_);
}
assert(row < rows_);
▲ return &elements_[row * columns_];
assert(column < columns_);
return
}
private:
Line 352 ⟶ 347:
size_t columns = acolumns * bcolumns;
matrix<scalar_type> c(rows, columns);
for (size_t i = 0; i < rows; ++i)
for (size_t j = 0; j < columns; ++j)
return c;
}
Line 373 ⟶ 364:
for (size_t i = 0; i < height; ++i)
for (size_t j = 0; j < width; ++j)
QImage image(&imageData[0], width, height, bytesPerLine, QImage::Format_Indexed8);
|