Simplex_tree_node_explicit_storage.h
1/* This file is part of the Gudhi Library - https://gudhi.inria.fr/ - which is released under MIT.
2 * See file LICENSE or go to https://gudhi.inria.fr/licensing/ for full license details.
3 * Author(s): Clément Maria
4 *
5 * Copyright (C) 2014 Inria
6 *
7 * Modification(s):
8 * - YYYY/MM Author: Description of the modification
9 */
10
11#ifndef SIMPLEX_TREE_SIMPLEX_TREE_NODE_EXPLICIT_STORAGE_H_
12#define SIMPLEX_TREE_SIMPLEX_TREE_NODE_EXPLICIT_STORAGE_H_
13
14#include <vector>
15
16namespace Gudhi {
17
18/* \addtogroup simplex_tree
19 * Represents a node of a Simplex_tree.
20 * @{
21 */
22
23/*
24 * \brief Node of a simplex tree with filtration value
25 * and simplex key.
26 *
27 * It stores explicitely its own filtration value and its own Simplex_key.
28 */
29template<class SimplexTree>
30struct Simplex_tree_node_explicit_storage : SimplexTree::Filtration_simplex_base, SimplexTree::Key_simplex_base {
31 typedef typename SimplexTree::Siblings Siblings;
33 typedef typename SimplexTree::Simplex_key Simplex_key;
34
35 Simplex_tree_node_explicit_storage(Siblings * sib = nullptr,
36 Filtration_value filtration = 0)
37 : children_(sib) {
38 this->assign_filtration(filtration);
39 }
40
41 /*
42 * Assign children to the node
43 */
44 void assign_children(Siblings * children) {
45 children_ = children;
46 }
47
48 /* Careful -> children_ can be NULL*/
49 Siblings * children() {
50 return children_;
51 }
52
53 private:
54 Siblings * children_;
55};
56
57/* @} */ // end addtogroup simplex_tree
58} // namespace Gudhi
59
60#endif // SIMPLEX_TREE_SIMPLEX_TREE_NODE_EXPLICIT_STORAGE_H_
Value type for a filtration function on a cell complex.
Definition: FiltrationValue.h:20
Key type used as simplex identifier.
Definition: SimplexKey.h:15
GUDHIdev  Version 3.5.0  - C++ library for Topological Data Analysis (TDA) and Higher Dimensional Geometry Understanding.  - Copyright : MIT Generated on Tue Aug 16 2022 14:01:50 for GUDHIdev by Doxygen 1.9.4