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>
27template<
class SimplexTree,
class MapContainer>
41 typedef MapContainer Dictionary;
42 typedef typename MapContainer::iterator Dictionary_it;
43 typedef typename MapContainer::const_iterator Dictionary_const_it;
62 template<
typename RandomAccessVertexRange>
66 members_(boost::container::ordered_unique_range, members.begin(),
68 for (
auto& map_el : members_) {
69 map_el.second.assign_children(
this);
80 auto ins = members_.emplace(v,
Node(
this, filtration_value));
81 if (!ins.second && filtration(ins.first) > filtration_value)
82 ins.first->second.assign_filtration(filtration_value);
86 return members_.find(v);
89 return members_.find(v);
92 Simplex_tree_siblings * oncles() {
95 const Simplex_tree_siblings * oncles()
const {
103 Dictionary & members() {
107 const Dictionary & members()
const {
111 size_t size()
const {
112 return members_.size();
115 void erase(
const Dictionary_it iterator) {
116 members_.erase(iterator);
119 Dictionary_it to_non_const_it(Dictionary_const_it it) {
120 return members_.erase(it, it);
123 Simplex_tree_siblings * oncles_;
Iterator over the simplices of the boundary of a simplex and their opposite vertices.
Definition: Simplex_tree_iterators.h:193
Iterator over the simplices of the boundary of a simplex.
Definition: Simplex_tree_iterators.h:81
Iterator over the simplices of a simplicial complex.
Definition: Simplex_tree_iterators.h:308
Data structure to store a set of nodes in a SimplexTree sharing the same parent node.
Definition: Simplex_tree_siblings.h:28
void insert(Vertex_handle v, Filtration_value filtration_value)
Inserts a Node in the set of siblings nodes.
Definition: Simplex_tree_siblings.h:79
Simplex_tree_siblings(Simplex_tree_siblings *oncles, Vertex_handle parent, const RandomAccessVertexRange &members)
Constructor with initialized set of members.
Definition: Simplex_tree_siblings.h:63
Iterator over the vertices of a simplex in a SimplexTree.
Definition: Simplex_tree_iterators.h:36
Iterator over the simplices of the skeleton of a given dimension of the simplicial complex.
Definition: Simplex_tree_iterators.h:382
Gudhi namespace.
Definition: SimplicialComplexForAlpha.h:14
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:40
Handle type for the vertices of a cell complex.
Definition: VertexHandle.h:15