Wildmeshing Toolkit
|
#include <RawSimplexCollection.hpp>
Public Member Functions | |
RawSimplexCollection (std::vector< RawSimplex > &&simplices={}) | |
RawSimplexCollection (SimplexCollection &&sc) | |
const std::vector< RawSimplex > & | simplex_vector () const |
Return const reference to the RawSimplex vector. More... | |
std::vector< RawSimplex > | simplex_vector (const int64_t dimension) const |
Return vector of all simplices of the requested dimension. More... | |
void | add (const RawSimplex &simplex) |
Add simplex to the collection. More... | |
void | add (const Mesh &mesh, const Simplex &simplex) |
void | add (const RawSimplexCollection &simplex_collection) |
void | add (const SimplexCollection &simplex_collection) |
void | add (const Mesh &mesh, const PrimitiveType &ptype, const std::vector< Tuple > &tuple_vec) |
void | sort_and_clean () |
Sort simplex vector and remove duplicates. More... | |
bool | contains (const RawSimplex &simplex) const |
Check if simplex is contained in collection. More... | |
auto | begin () |
auto | end () |
auto | begin () const |
auto | end () const |
auto | cbegin () const |
auto | cend () const |
Static Public Member Functions | |
static RawSimplexCollection | get_union (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b) |
Get union of two simplex collections. More... | |
static RawSimplexCollection | get_intersection (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b) |
Get intersection of two simplex collections. More... | |
static bool | are_simplex_collections_equal (const RawSimplexCollection &collection_a, const RawSimplexCollection &collection_b) |
Check if the two simplex collections are equal. More... | |
Private Attributes | |
std::vector< RawSimplex > | m_simplices |
Definition at line 10 of file RawSimplexCollection.hpp.
|
inline |
Definition at line 13 of file RawSimplexCollection.hpp.
wmtk::simplex::RawSimplexCollection::RawSimplexCollection | ( | SimplexCollection && | sc | ) |
Definition at line 8 of file RawSimplexCollection.cpp.
References add().
void wmtk::simplex::RawSimplexCollection::add | ( | const Mesh & | mesh, |
const PrimitiveType & | ptype, | ||
const std::vector< Tuple > & | tuple_vec | ||
) |
Definition at line 55 of file RawSimplexCollection.cpp.
References m_simplices.
Definition at line 33 of file RawSimplexCollection.cpp.
References add().
void wmtk::simplex::RawSimplexCollection::add | ( | const RawSimplex & | simplex | ) |
Add simplex to the collection.
There is no sorting or any check if the vertex already exists
Definition at line 28 of file RawSimplexCollection.cpp.
References m_simplices.
Referenced by add(), and RawSimplexCollection().
void wmtk::simplex::RawSimplexCollection::add | ( | const RawSimplexCollection & | simplex_collection | ) |
Definition at line 38 of file RawSimplexCollection.cpp.
References m_simplices.
void wmtk::simplex::RawSimplexCollection::add | ( | const SimplexCollection & | simplex_collection | ) |
Definition at line 44 of file RawSimplexCollection.cpp.
References add(), m_simplices, wmtk::simplex::SimplexCollection::mesh(), and wmtk::simplex::SimplexCollection::simplex_vector().
|
static |
Check if the two simplex collections are equal.
The collections must be cleaned and sorted.
Definition at line 115 of file RawSimplexCollection.cpp.
References get_union(), and m_simplices.
|
inline |
Definition at line 83 of file RawSimplexCollection.hpp.
References m_simplices.
Referenced by contains(), and get_union().
|
inline |
Definition at line 85 of file RawSimplexCollection.hpp.
References m_simplices.
|
inline |
Definition at line 87 of file RawSimplexCollection.hpp.
References m_simplices.
|
inline |
Definition at line 88 of file RawSimplexCollection.hpp.
References m_simplices.
bool wmtk::simplex::RawSimplexCollection::contains | ( | const RawSimplex & | simplex | ) | const |
Check if simplex is contained in collection.
Collection musst be sorted! Peform sort_and_clean
before calling this function.
Definition at line 74 of file RawSimplexCollection.cpp.
References begin(), and end().
|
inline |
Definition at line 84 of file RawSimplexCollection.hpp.
References m_simplices.
Referenced by contains(), and get_union().
|
inline |
Definition at line 86 of file RawSimplexCollection.hpp.
References m_simplices.
|
static |
Get intersection of two simplex collections.
The collections must be sorted!
Definition at line 96 of file RawSimplexCollection.cpp.
References m_simplices, and wmtk::components::set_intersection().
|
static |
Get union of two simplex collections.
The collections must be sorted!
Definition at line 80 of file RawSimplexCollection.cpp.
References begin(), end(), and m_simplices.
Referenced by are_simplex_collections_equal().
|
inline |
Return const reference to the RawSimplex vector.
Definition at line 22 of file RawSimplexCollection.hpp.
References m_simplices.
std::vector< RawSimplex > wmtk::simplex::RawSimplexCollection::simplex_vector | ( | const int64_t | dimension | ) | const |
Return vector of all simplices of the requested dimension.
Definition at line 13 of file RawSimplexCollection.cpp.
References m_simplices.
void wmtk::simplex::RawSimplexCollection::sort_and_clean | ( | ) |
Sort simplex vector and remove duplicates.
Definition at line 67 of file RawSimplexCollection.cpp.
References m_simplices.
|
private |
Definition at line 91 of file RawSimplexCollection.hpp.
Referenced by add(), are_simplex_collections_equal(), begin(), cbegin(), cend(), end(), get_intersection(), get_union(), simplex_vector(), and sort_and_clean().