38 Scheme(
const std::string &simulation_id) :
42 "step integer NOT NULL," +
43 "num_cells integer NOT NULL," +
44 "hours real NOT NULL" +
50 "step integer NOT NULL," +
51 "cell_id integer NOT NULL," +
52 "type integer NOT NULL," +
53 "state integer NOT NULL," +
57 "radius real NOT NULL);"),
62 "step, cell_id, type, state, x, y, z, radius)"),
66 template<
typename cell_t,
typename world_t>
68 auto pos = c->getBody().getPosition();
73 ss << w->getNbUpdates() <<
", ";
74 ss << c->getId() <<
", ";
75 ss << static_cast<unsigned int>(c->getType()) <<
",";
76 ss << static_cast<unsigned int>(c->getState()) <<
",";
77 ss <<
pos.
x() <<
", ";
78 ss <<
pos.
y() <<
", ";
79 ss <<
pos.
z() <<
", ";
80 ss << c->getBody().getBoundingBoxRadius();
84 template<
typename world_t>
88 ss << w->getNbUpdates() <<
", ";
89 ss << w->cells.size() <<
", ";
90 ss << w->getNbUpdates() * w->dt / 3600;
Provides common mathematical functions and vector operations.
void CellValueStatement(std::stringstream &ss, cell_t *c, world_t *w)
const std::string WorldTable
const std::string WorldTableDataLayout
const std::string CellTable
const std::string CellTableDataLayout
std::string WorldTableCreationStatement
std::string CellTableCreationStatement
Scheme(const std::string &simulation_id)
std::string WorldValueStatement(world_t *w)