Wildmeshing Toolkit
tuple_vector_to_homogeneous_simplex_vector.cpp
Go to the documentation of this file.
1 
3 
4 #include <wmtk/Mesh.hpp>
5 
6 #include <algorithm>
7 #include <iterator>
8 
9 namespace wmtk::simplex::utils {
11  const Mesh& m,
12  const std::vector<Tuple>& tups,
13  PrimitiveType primitive)
14 {
15  std::vector<Simplex> r;
16  r.reserve(tups.size());
17  std::transform(
18  tups.begin(),
19  tups.end(),
20  std::back_inserter(r),
21  [&m, primitive](const Tuple& t) { return Simplex(m, primitive, t); });
22  return r;
23 }
24 } // namespace wmtk::simplex::utils
std::vector< Simplex > tuple_vector_to_homogeneous_simplex_vector(const Mesh &m, const std::vector< Tuple > &tups, PrimitiveType primitive)