11 #ifndef SIMPLEX_TREE_SIMPLEX_TREE_SIBLINGS_H_
12 #define SIMPLEX_TREE_SIMPLEX_TREE_SIBLINGS_H_
14 #include <gudhi/Simplex_tree/Simplex_tree_node_explicit_storage.h>
16 #include <boost/container/flat_map.hpp>
30 template<
class SimplexTree,
class MapContainer>
31 class Simplex_tree_siblings {
35 template<
class T>
friend class Simplex_tree_simplex_vertex_iterator;
36 template<
class T>
friend class Simplex_tree_boundary_simplex_iterator;
37 template<
class T>
friend class Simplex_tree_complex_simplex_iterator;
38 template<
class T>
friend class Simplex_tree_skeleton_simplex_iterator;
42 typedef typename SimplexTree::Node Node;
43 typedef MapContainer Dictionary;
44 typedef typename MapContainer::iterator Dictionary_it;
47 Simplex_tree_siblings()
54 Simplex_tree_siblings(Simplex_tree_siblings * oncles,
Vertex_handle parent)
63 template<
typename RandomAccessVertexRange>
64 Simplex_tree_siblings(Simplex_tree_siblings * oncles,
Vertex_handle parent,
const RandomAccessVertexRange & members)
67 members_(boost::container::ordered_unique_range, members.begin(),
69 for (
auto& map_el : members_) {
70 map_el.second.assign_children(
this);
82 auto ins = members_.emplace(v, Node(
this, filtration_value));
83 if (!ins.second && filtration(ins.first) > filtration_value)
84 ins.first->second.assign_filtration(filtration_value);
88 return members_.find(v);
91 Simplex_tree_siblings * oncles() {
99 Dictionary & members() {
103 size_t size()
const {
104 return members_.size();
107 void erase(
const Dictionary_it iterator) {
108 members_.erase(iterator);
111 Simplex_tree_siblings * oncles_;
119 #endif // SIMPLEX_TREE_SIMPLEX_TREE_SIBLINGS_H_