Page MenuHomec4science

grid.cc
No OneTemporary

File Metadata

Created
Wed, Nov 13, 07:55
/* -------------------------------------------------------------------------- */
#include "grid.hh"
/* -------------------------------------------------------------------------- */
#include <algorithm>
/* -------------------------------------------------------------------------- */
/* -------------------------------------------------------------------------- */
Grid::Grid(int m, int n) : m_m(m), m_n(n), m_storage(m * n) { clear(); }
/* -------------------------------------------------------------------------- */
void Grid::clear() { std::fill(m_storage.begin(), m_storage.end(), 0.); }
/* -------------------------------------------------------------------------- */
void Grid::resize(int m, int n) {
m_m = m;
m_n = n;
m_storage.resize(m*n);
}
/* -------------------------------------------------------------------------- */
int Grid::m() const { return m_m; }
int Grid::n() const { return m_n; }
/* -------------------------------------------------------------------------- */

Event Timeline