10 std::vector<IdSimplex> simplices;
15 if (s.primitive_type() == ptype) {
16 simplices.emplace_back(s);
30 std::vector<Tuple> tuples;
35 if (s.primitive_type() == ptype) {
58 for (
const Tuple& t : tuple_vec) {
96 std::set_union(a.cbegin(), a.cend(), b.cbegin(), b.cend(), std::back_inserter(sc.
m_simplices));
128 for (int64_t i = 0; i < collection_a.
size(); ++i) {
Tuple get_tuple_from_id_simplex(const simplex::IdSimplex &s) const
void sort_and_clean()
Sort simplex vector and remove duplicates.
static IdSimplexCollection get_intersection(const IdSimplexCollection &collection_a, const IdSimplexCollection &collection_b)
Get intersection of two simplex collections.
void add(const IdSimplex &simplex)
Add simplex to the collection.
bool operator==(const IdSimplexCollection &other) const
static IdSimplexCollection get_union(const IdSimplexCollection &collection_a, const IdSimplexCollection &collection_b)
Get union of two simplex collections.
std::vector< IdSimplex > m_simplices
std::vector< Tuple > simplex_vector_tuples(PrimitiveType ptype) const
Return vector of all simplices of the requested type, as tuples.
const Mesh & mesh() const
void reserve(const size_t new_cap)
const std::vector< IdSimplex > & simplex_vector() const
Return const reference to the simplex vector.
bool contains(const IdSimplex &simplex) const
Check if simplex is contained in collection.
static bool are_simplex_collections_equal(const IdSimplexCollection &collection_a, const IdSimplexCollection &collection_b)
Check if the two simplex collections are equal.
void set_intersection(const std::unordered_set< int > &s1, const std::unordered_set< int > &s2, std::vector< int > &v)