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>
30template<
class SimplexTree,
class MapContainer>
44 typedef MapContainer Dictionary;
45 typedef typename MapContainer::iterator Dictionary_it;
64 template<
typename RandomAccessVertexRange>
68 members_(boost::container::ordered_unique_range, members.begin(),
70 for (
auto& map_el : members_) {
71 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_;
Iterator over the simplices of the boundary of a simplex and their opposite vertices.
Definition: Simplex_tree_iterators.h:194
Iterator over the simplices of the boundary of a simplex.
Definition: Simplex_tree_iterators.h:82
Iterator over the simplices of a simplicial complex.
Definition: Simplex_tree_iterators.h:309
Data structure to store a set of nodes in a SimplexTree sharing the same parent node.
Definition: Simplex_tree_siblings.h:31
void insert(Vertex_handle v, Filtration_value filtration_value)
Inserts a Node in the set of siblings nodes.
Definition: Simplex_tree_siblings.h:81
Simplex_tree_siblings(Simplex_tree_siblings *oncles, Vertex_handle parent, const RandomAccessVertexRange &members)
Constructor with initialized set of members.
Definition: Simplex_tree_siblings.h:65
Iterator over the vertices of a simplex in a SimplexTree.
Definition: Simplex_tree_iterators.h:37
Iterator over the simplices of the skeleton of a given dimension of the simplicial complex.
Definition: Simplex_tree_iterators.h:383
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20
Node of a simplex tree with filtration value and simplex key.
Definition: Simplex_tree_node_explicit_storage.h:38
Handle type for the vertices of a cell complex.
Definition: VertexHandle.h:15