I'm writing some code that generates a vector of geometric elements:
struct Geom_Entity {
// a bunch of geometric information,
// like tangent planes, force vectors, etc
}
The code is parsing many of these entities from a text file (for e.g.) so we have a function currently:
parse_Geom(x: String) -> Vec<Geom_Entity> {
// a bunch of code
}
These geometric entities are large structs with 17 f64
s and a few other fields. The file may contain well over 1000 of these, but not so many that they can't all fit into memory (at least for now).
Also, should I be doing
Box::new(Geom_Entity { ...
and then putting the box in the vector?